From bacf0c0a07956b217b7953953f5f5fca852f1178 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 13 Jan 2009 18:47:11 +0000 Subject: Add more verbose apt cache mismatch errors git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5021 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/APT.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py index 6e345b9c7..f0fa9a642 100644 --- a/src/lib/Client/Tools/APT.py +++ b/src/lib/Client/Tools/APT.py @@ -147,10 +147,15 @@ class APT(Bcfg2.Client.Tools.Tool): ipkgs.append("%s=%s" % (pkg.get('name'), self.pkg_cache[pkg.get('name')].candidateVersion)) continue - if pkg.get('version') in \ - [p.VerStr for p in self.pkg_cache[pkg.get('name')]._pkg.VersionList]: + avail_vers = [x.VerStr for x in \ + self.pkg_cache[pkg.get('name')]._pkg.VersionList] + if pkg.get('version') in avail_vers: ipkgs.append("%s=%s" % (pkg.get('name'), pkg.get('version'))) continue + else: + self.logger.error("Package %s: desired version %s not in %s" \ + % (pkg.get('name'), pkg.get('version'), + avail_vers)) bad_pkgs.append(pkg.get('name')) if bad_pkgs: self.logger.error("Cannot find correct versions of packages:") -- cgit v1.2.3-1-g7c22