diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-06-14 20:41:13 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-06-14 20:41:13 +0000 |
commit | 8b76968c2b22e5df0fd7ed7c86379f32ac5d595d (patch) | |
tree | b742ca3a87998ce705f80ad8d0bde434bff25023 /src/lib/Client | |
parent | 4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a (diff) | |
download | bcfg2-8b76968c2b22e5df0fd7ed7c86379f32ac5d595d.tar.gz bcfg2-8b76968c2b22e5df0fd7ed7c86379f32ac5d595d.tar.bz2 bcfg2-8b76968c2b22e5df0fd7ed7c86379f32ac5d595d.zip |
APT: Force cache reload to get data from source updates
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5278 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r-- | src/lib/Client/Tools/APT.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py index 7813d012d..a124746b1 100644 --- a/src/lib/Client/Tools/APT.py +++ b/src/lib/Client/Tools/APT.py @@ -29,15 +29,13 @@ class APT(Bcfg2.Client.Tools.Tool): Bcfg2.Client.Tools.Tool.__init__(self, logger, cfg, setup) self.cfg = cfg os.environ["DEBIAN_FRONTEND"] = 'noninteractive' - self.pkg_cache = apt.cache.Cache() self.actions = {} if self.setup['kevlar'] and not self.setup['dryrun']: self.cmd.run("dpkg --force-confold --configure --pending") self.cmd.run("apt-get clean") - try: - self.pkg_cache.update() - except: - self.logger.error("Failed to update apt cache") + self.pkg_cache = apt.cache.Cache() + self.pkg_cache.update() + self.pkg_cache = apt.cache.Cache() def FindExtra(self): '''Find extra packages''' |