summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/APT.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-26 07:53:22 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-26 07:53:22 +0000
commit1e7086f009aeea0b749fa3ff24946438298f5943 (patch)
treea3623191f6dab3f563d40e20a842bdd423a8c406 /src/lib/Client/Tools/APT.py
parent61c22fb8442281e6ecc5f3704c56f78beb511c7d (diff)
downloadbcfg2-1e7086f009aeea0b749fa3ff24946438298f5943.tar.gz
bcfg2-1e7086f009aeea0b749fa3ff24946438298f5943.tar.bz2
bcfg2-1e7086f009aeea0b749fa3ff24946438298f5943.zip
Produce better message from APT when no md5sums exist (though verification will still fail) (Resolves Ticket #294)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2540 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/APT.py')
-rw-r--r--src/lib/Client/Tools/APT.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 0bd6acee9..7720c3336 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -53,6 +53,10 @@ class APT(Bcfg2.Client.Tools.PkgTool):
if self.installed[entry.attrib['name']] == entry.attrib['version']:
if not self.setup['quick'] and entry.get('verify', 'true') == 'true':
output = self.cmd.run("/usr/bin/debsums -as %s" % entry.get('name'))[1]
+ if len(output) == 1 and "no md5sums for" in output[0]:
+ self.logger.info("Package %s has no md5sums. Cannot verify" % \
+ entry.get('name'))
+ return False
files = [item.split()[-1] for item in output]
bad = [filename for filename in files if filename not in modlist]
if bad: