summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-23 01:13:13 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-23 01:13:13 +0000
commitdb032e946c96d09841eeab7c549fee1497c615d7 (patch)
tree93f2d13ed687afabf9de31b0e9d36521d9cb07a9 /src/lib/Client/Tools
parentc75deeb47e2a50636c7db903978ffeef2b2babfc (diff)
downloadbcfg2-db032e946c96d09841eeab7c549fee1497c615d7.tar.gz
bcfg2-db032e946c96d09841eeab7c549fee1497c615d7.tar.bz2
bcfg2-db032e946c96d09841eeab7c549fee1497c615d7.zip
Fix package removal [report from naapuri]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2530 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools')
-rw-r--r--src/lib/Client/Tools/APT.py2
-rw-r--r--src/lib/Client/Tools/RPM.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 513288b4d..6d8e38a7a 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -67,7 +67,7 @@ class APT(Bcfg2.Client.Tools.PkgTool):
self.logger.info('Removing packages:')
self.logger.info(packages)
self.cmd.run("apt-get remove -y --force-yes %s" % \
- " ".join(packages))
+ " ".join([pkg.get('name') for pkg in packages]))
self.RefreshPackages()
self.extra = self.FindExtraPackages()
diff --git a/src/lib/Client/Tools/RPM.py b/src/lib/Client/Tools/RPM.py
index 3a3d1b7e4..efdd05a90 100644
--- a/src/lib/Client/Tools/RPM.py
+++ b/src/lib/Client/Tools/RPM.py
@@ -74,9 +74,9 @@ class RPM(Bcfg2.Client.Tools.PkgTool):
return False
return True
- def RemovePackages(self, entries):
+ def RemovePackages(self, packages):
'''Remove specified entries'''
- pkgnames = " ".join([entry[2] for entry in entries])
+ pkgnames = [pkg.get('name') for pkg in packages]
if len(pkgnames) > 0:
self.logger.info("Removing packages: %s" % pkgnames)
self.cmd.run("rpm --quiet -e --allmatches %s" % " ".join(pkgnames))