From: Mathieu Bridon <bochecha(a)daitauha.fr>
In Fedora, we eventually want to move away from MD5 hashes, and as part
of this effort we would like to have the hashtype as part of the
download URL.
This makes it trivial, all we'd have to do is to somehow change the
download_path attribute. (either changing it in pyrpkg, or overriding in
a subclass in fedpkg)
---
src/pyrpkg/lookaside.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pyrpkg/lookaside.py b/src/pyrpkg/lookaside.py
index 8badc73..14d0640 100644
--- a/src/pyrpkg/lookaside.py
+++ b/src/pyrpkg/lookaside.py
@@ -126,7 +126,8 @@ class CGILookasideCache(object):
self.log.info("Downloading %s", filename)
urled_file = filename.replace(' ', '%20')
- path_dict = {'name': name, 'filename': urled_file,
'hash': hash}
+ path_dict = {'name': name, 'filename': urled_file,
'hash': hash,
+ 'hashtype': hashtype}
path = self.download_path % path_dict
url = '%s/%s' % (self.download_url, path)
self.log.debug("Full url: %s" % url)
--
2.1.0