summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/APT.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-27 01:17:41 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-27 01:17:41 +0000
commit05e6ee19d2d6e3bc5491a690c78fdb611b3d6a57 (patch)
tree55e936d3a434f16dcee44805848c81ddfb40075a /src/lib/Client/Tools/APT.py
parent8b754e6d80a9a6a6fc17b300ad6461aa60079fe9 (diff)
downloadbcfg2-05e6ee19d2d6e3bc5491a690c78fdb611b3d6a57.tar.gz
bcfg2-05e6ee19d2d6e3bc5491a690c78fdb611b3d6a57.tar.bz2
bcfg2-05e6ee19d2d6e3bc5491a690c78fdb611b3d6a57.zip
Add support for different output formats for debsums (Resolves Ticket #298)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2545 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/APT.py')
-rw-r--r--src/lib/Client/Tools/APT.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 7720c3336..308f157d8 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -57,7 +57,16 @@ class APT(Bcfg2.Client.Tools.PkgTool):
self.logger.info("Package %s has no md5sums. Cannot verify" % \
entry.get('name'))
return False
- files = [item.split()[-1] for item in output]
+ files = []
+ for item in output:
+ if "checksum mismatch" in item:
+ files.append(item.split()[-1])
+ elif "can't open" in item:
+ files.append(item.split()[5])
+ else:
+ self.logger.error("Got Unsupported pattern %s from debsums" \
+ % item)
+ files.append(item)
bad = [filename for filename in files if filename not in modlist]
if bad:
self.logger.info("Package %s failed validation. Bad files are:" % \