lookaside: Add the hash type to the folder structure

This makes it more explicit which hash was used for a given tarball.

https://fedorahosted.org/rel-eng/ticket/5846
This commit is contained in:
Mathieu Bridon 2014-10-28 10:47:39 +01:00 committed by Pierre-Yves Chibon
parent a92efe252a
commit 1b2337558f

View file

@ -148,7 +148,11 @@ def main():
print >> sys.stderr, '[username=%s] Processing upload request: NAME=%s FILENAME=%s %sSUM=%s' % (username, name, filename, hash_type.upper(), checksum)
module_dir = os.path.join(CACHE_DIR, name)
hash_dir = os.path.join(module_dir, filename, checksum)
hash_dir = os.path.join(module_dir, filename, hash_type, checksum)
if hash_type == "md5":
# Preserve compatibility with the current folder hierarchy for md5
hash_dir = os.path.join(module_dir, filename, checksum)
# first test if the module really exists
git_dir = os.path.join(GITREPO, '%s.git' % name)