summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-27 17:59:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-27 17:59:15 +0000
commit3f50ca7c85a6bfae26588c228467db86095c9a08 (patch)
tree23109cbb02e1493654938355800415eb47296f39
parente9c03a2270110501f92f5166df1d643589782e88 (diff)
downloadbcfg2-3f50ca7c85a6bfae26588c228467db86095c9a08.tar.gz
bcfg2-3f50ca7c85a6bfae26588c228467db86095c9a08.tar.bz2
bcfg2-3f50ca7c85a6bfae26588c228467db86095c9a08.zip
Fix pkgmgr issues with autosplit packages
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2995 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Pkgmgr.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py
index f473240f5..e212e0c95 100644
--- a/src/lib/Server/Plugins/Pkgmgr.py
+++ b/src/lib/Server/Plugins/Pkgmgr.py
@@ -30,9 +30,10 @@ class PNode(Bcfg2.Server.Plugin.INode):
for pkg in data.findall('./Package'):
if pkg.attrib.has_key('name') and pkg.get('name') not in pdict['Package']:
pdict['Package'].append(pkg.get('name'))
- self.contents['Package'][pkg.get('name')] = {}
- if pkg.getchildren():
- self.contents['Package'][pkg.get('name')]['__children__'] \
+ if pkg.get('name') != None:
+ self.contents['Package'][pkg.get('name')] = {}
+ if pkg.getchildren():
+ self.contents['Package'][pkg.get('name')]['__children__'] \
= pkg.getchildren()
if pkg.attrib.has_key('simplefile'):
pkg.set('url', "%s/%s" % (pkg.get('uri'), pkg.get('simplefile')))
@@ -53,7 +54,7 @@ class PNode(Bcfg2.Server.Plugin.INode):
logger.error("Failed to match pkg %s" % pkg.get('file'))
continue
pkgname = mdata.group('name')
- self.contents['Package'][pkgname].update(mdata.groupdict())
+ self.contents['Package'][pkgname] = mdata.groupdict()
if pkg.attrib.get('file'):
self.contents['Package'][pkgname]['url'] = pkg.get('url')
self.contents['Package'][pkgname]['type'] = pkg.get('type')
@@ -63,6 +64,8 @@ class PNode(Bcfg2.Server.Plugin.INode):
self.contents['Package'][pkgname]['multiarch'] = pkg.get('multiarch')
if pkgname not in pdict['Package']:
pdict['Package'].append(pkgname)
+ if pkg.getchildren():
+ self.contents['Package'][pkgname]['__children__'] = pkg.getchildren()
else:
self.contents['Package'][pkg.get('name')].update(pkg.attrib)