From eddb9900f0f6804e0d52c32b0a8cab2bc67096b4 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 30 Nov 2004 23:02:50 +0000 Subject: host specific package lists (Logical change 1.154) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@684 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Generators/Pkgmgr.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/lib/Server/Generators/Pkgmgr.py b/src/lib/Server/Generators/Pkgmgr.py index 63e65970d..eee1528c1 100644 --- a/src/lib/Server/Generators/Pkgmgr.py +++ b/src/lib/Server/Generators/Pkgmgr.py @@ -52,6 +52,11 @@ class Pkgmgr(Generator): def LocatePackage(self, entry, metadata): '''Locates a package entry for particular metadata''' pkgname = entry.get('name') + if self.pkgdir.has_key("%s.xml" % metadata.hostname): + pkglist = self.pkgdir["%s.xml" % metadata.hostname] + if pkglist.packages.has_key(pkgname): + entry.attrib.update(pkglist.packages[pkgname]) + return pkglist = self.pkgdir["%s.xml" % (metadata.image)] if pkglist.packages.has_key(pkgname): pkg = pkglist.packages[pkgname] -- cgit v1.2.3-1-g7c22