From 7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 3 Aug 2012 14:28:34 -0400 Subject: fixed calculation of new packages list --- src/lib/Bcfg2/Server/Plugins/Packages/Yum.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Yum.py') diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py index 27523f2ab..ce1d9886f 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py @@ -466,6 +466,19 @@ class YumCollection(Collection): attrs.update(pkgattrs) lxml.etree.SubElement(entry, 'BoundPackage', **attrs) + def get_new_packages(self, initial, complete): + initial_names = [] + for pkg in initial: + if isinstance(pkg, tuple): + initial_names.append(pkg[0]) + else: + initial_names.append(pkg) + new = [] + for pkg in complete: + if pkg[0] not in initial_names: + new.append(pkg) + return new + def complete(self, packagelist): if not self.use_yum: return Collection.complete(self, packagelist) -- cgit v1.2.3-1-g7c22