summaryrefslogtreecommitdiffstats
path: root/roles/distgit
diff options
context:
space:
mode:
authorMathieu Bridon <bochecha@daitauha.fr>2014-10-28 10:47:39 +0100
committerPierre-Yves Chibon <pingou@pingoured.fr>2014-10-28 10:59:01 +0100
commit1b2337558f02131e63a8fd44aa3a098c39df8aed (patch)
tree51afb3a67c88557a0b1572f2bb824146d11de68c /roles/distgit
parenta92efe252a92f3f0e415ef7db5507095f860ea72 (diff)
downloadansible-1b2337558f02131e63a8fd44aa3a098c39df8aed.zip
ansible-1b2337558f02131e63a8fd44aa3a098c39df8aed.tar.gz
ansible-1b2337558f02131e63a8fd44aa3a098c39df8aed.tar.xz
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
Diffstat (limited to 'roles/distgit')
-rw-r--r--roles/distgit/files/dist-git-upload.cgi6
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/distgit/files/dist-git-upload.cgi b/roles/distgit/files/dist-git-upload.cgi
index 0fcf821..6610d8f 100644
--- a/roles/distgit/files/dist-git-upload.cgi
+++ b/roles/distgit/files/dist-git-upload.cgi
@@ -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)