diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-05-20 01:14:42 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-05-20 01:14:42 +0000 |
commit | ae3c07c882a5ceaa254ae4633a656e6abb5d3062 (patch) | |
tree | 97b43b4013526ce2fd97b762f74082728b4cf893 /src | |
parent | 260f66263dbb3104eabb930f86bf1fff02389509 (diff) | |
download | bcfg2-ae3c07c882a5ceaa254ae4633a656e6abb5d3062.tar.gz bcfg2-ae3c07c882a5ceaa254ae4633a656e6abb5d3062.tar.bz2 bcfg2-ae3c07c882a5ceaa254ae4633a656e6abb5d3062.zip |
Fix Pkgmgr virtual package target binding (Reported by TimL)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5245 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugin.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Pkgmgr.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index c5cf80fa4..b127a8e34 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -435,7 +435,7 @@ class PrioDir(Plugin, Generator, XMLDirectoryBacked): raise PluginExecutionError matching = [src for src in self.entries.values() if src.cache and entry.tag in src.cache[1] - and name in src.cache[1][entry.tag]] + and src.cache[1][entry.tag].has_key(name)] if len(matching) == 0: raise PluginExecutionError elif len(matching) == 1: diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py index 49ac5bf26..e154c4449 100644 --- a/src/lib/Server/Plugins/Pkgmgr.py +++ b/src/lib/Server/Plugins/Pkgmgr.py @@ -148,3 +148,8 @@ class Pkgmgr(Bcfg2.Server.Plugin.PrioDir): entry.findall('Instance') \ if inst.get('arch') not in arches] + def HandlesEntry(self, entry, metadata): + return entry.tag == 'Package' and entry.get('name').split(':')[0] in self.Entries['Package'].keys() + + def HandleEntry(self, entry, metadata): + self.BindEntry(entry, metadata) |