summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/APT.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-06-14 19:42:01 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-06-14 19:42:01 +0000
commit084828ef29ab87db18831ff8cbfd88ed744c082f (patch)
tree6ea86a336022eaa4840dbe4dc05a79a4903a0aeb /src/lib/Client/Tools/APT.py
parent2e92f97fc68634bf966c6e4dc8ce2f36ae809fd4 (diff)
downloadbcfg2-084828ef29ab87db18831ff8cbfd88ed744c082f.tar.gz
bcfg2-084828ef29ab87db18831ff8cbfd88ed744c082f.tar.bz2
bcfg2-084828ef29ab87db18831ff8cbfd88ed744c082f.zip
APT: fix cache invalidation
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5276 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/APT.py')
-rw-r--r--src/lib/Client/Tools/APT.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 60863498f..7813d012d 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -125,12 +125,14 @@ class APT(Bcfg2.Client.Tools.Tool):
def Remove(self, packages):
'''Deal with extra configuration detected'''
pkgnames = " ".join([pkg.get('name') for pkg in packages])
+ self.pkg_cache = apt.cache.Cache()
if len(packages) > 0:
self.logger.info('Removing packages:')
self.logger.info(pkgnames)
for pkg in pkgnames.split(" "):
self.pkg_cache[pkg].markDelete(purge=True)
self.pkg_cache.commit()
+ self.pkg_cache = apt.cache.Cache()
self.modified += packages
self.extra = self.FindExtra()