summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-01-13 18:47:11 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-01-13 18:47:11 +0000
commitbacf0c0a07956b217b7953953f5f5fca852f1178 (patch)
tree1c7800d6dd3507bfee479868b50a763b6ec5b9f3 /src
parent482d4c952bca5e466b92354e42f478ff8295241f (diff)
downloadbcfg2-bacf0c0a07956b217b7953953f5f5fca852f1178.tar.gz
bcfg2-bacf0c0a07956b217b7953953f5f5fca852f1178.tar.bz2
bcfg2-bacf0c0a07956b217b7953953f5f5fca852f1178.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/APT.py9
1 files changed, 7 insertions, 2 deletions
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:")