summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Pkgmgr.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py
index a11e237d1..7395b7930 100644
--- a/src/lib/Server/Plugins/Pkgmgr.py
+++ b/src/lib/Server/Plugins/Pkgmgr.py
@@ -129,3 +129,16 @@ class Pkgmgr(Bcfg2.Server.Plugin.PrioDir):
except KeyError:
self.Entries[itype] = FuzzyDict([(child,
self.BindEntry)])
+
+ def BindEntry(self, entry, metadata):
+ '''Bind data for entry, and remove instances that are not requested'''
+ pname = entry.get('name')
+ Bcfg2.Server.Plugin.PrioDir.BindEntry(self, entry, metadata)
+ if entry.findall('Instance'):
+ mdata = FuzzyDict.fuzzy.match(pname)
+ if mdata:
+ arches = mdata.group('alist').split(',')
+ [entry.remove(inst) for inst in \
+ entry.findall('Instance') \
+ if inst.get('arch') not in arches]
+