summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-03 14:28:34 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-03 14:28:34 -0400
commit7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35 (patch)
tree99e2dd2f1dcbc9636f2c66c6d3010096ed4786c8 /src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
parent047006a2c404b1ebd5eb0b643a6530a99a88b5ea (diff)
downloadbcfg2-7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35.tar.gz
bcfg2-7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35.tar.bz2
bcfg2-7ab620571cbf135aa3bfb0e1e3c6112e9a0b2f35.zip
fixed calculation of new packages list
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Yum.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Yum.py13
1 files changed, 13 insertions, 0 deletions
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)