projects
/
dak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
364ef09
)
Replace hardcoded hashfuncs with values generated from database
author
Joerg Jaspert
<joerg@debian.org>
Sun, 13 Mar 2016 14:23:34 +0000
(15:23 +0100)
committer
Joerg Jaspert
<joerg@debian.org>
Tue, 15 Mar 2016 21:41:53 +0000
(22:41 +0100)
dak/generate_releases.py
patch
|
blob
|
history
diff --git
a/dak/generate_releases.py
b/dak/generate_releases.py
index a1ef074f49a62b29230bd0e1c7c5e4600e5ca3ac..c359177235810258910b788ea09a85857ebc9cfe 100755
(executable)
--- a/
dak/generate_releases.py
+++ b/
dak/generate_releases.py
@@
-224,9
+224,8
@@
class ReleaseWriter(object):
os.chdir(os.path.join(suite.archive.path, "dists", suite.suite_name, suite_suffix))
- hashfuncs = { 'MD5Sum' : apt_pkg.md5sum,
- 'SHA1' : apt_pkg.sha1sum,
- 'SHA256' : apt_pkg.sha256sum }
+ hashfuncs = dict(zip([x.upper().replace('UM', 'um') for x in suite.checksums],
+ [getattr(apt_pkg, "%s" % (x)) for x in [x.replace("sum", "") + "sum" for x in suite.checksums]]))
fileinfo = {}