diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-11-26 07:53:22 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-11-26 07:53:22 +0000 |
commit | 1e7086f009aeea0b749fa3ff24946438298f5943 (patch) | |
tree | a3623191f6dab3f563d40e20a842bdd423a8c406 | |
parent | 61c22fb8442281e6ecc5f3704c56f78beb511c7d (diff) | |
download | bcfg2-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
-rw-r--r-- | src/lib/Client/Tools/APT.py | 4 |
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: |