summaryrefslogtreecommitdiffstats
path: root/roles/distgit
diff options
context:
space:
mode:
authorMathieu Bridon <bochecha@daitauha.fr>2015-02-05 18:33:58 +0100
committerMathieu Bridon <bochecha@daitauha.fr>2015-02-09 10:27:29 +0100
commit33ea9998d1cd748649aa9b04f9273c5ff531fcf7 (patch)
treee01d3480dfb599d261f74d5eda53b7f4c2150d28 /roles/distgit
parent5ab437652c14555dc882d1d82b13201940be7ebb (diff)
downloadansible-33ea9998d1cd748649aa9b04f9273c5ff531fcf7.zip
ansible-33ea9998d1cd748649aa9b04f9273c5ff531fcf7.tar.gz
ansible-33ea9998d1cd748649aa9b04f9273c5ff531fcf7.tar.xz
distgit: Add the path to the source file to the emitted messages
This is the counterpart of this change: https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/pull/170 Now that is has been deployed, we can start emitting the new messages.
Diffstat (limited to 'roles/distgit')
-rw-r--r--roles/distgit/files/dist-git-upload.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/distgit/files/dist-git-upload.cgi b/roles/distgit/files/dist-git-upload.cgi
index 6610d8f..3c5d874 100644
--- a/roles/distgit/files/dist-git-upload.cgi
+++ b/roles/distgit/files/dist-git-upload.cgi
@@ -149,10 +149,12 @@ def main():
module_dir = os.path.join(CACHE_DIR, name)
hash_dir = os.path.join(module_dir, filename, hash_type, checksum)
+ msgpath = os.path.join(name, module_dir, filename, hash_type, checksum, filename)
if hash_type == "md5":
# Preserve compatibility with the current folder hierarchy for md5
hash_dir = os.path.join(module_dir, filename, checksum)
+ msgpath = os.path.join(name, module_dir, filename, checksum, filename)
# first test if the module really exists
git_dir = os.path.join(GITREPO, '%s.git' % name)
@@ -222,7 +224,8 @@ def main():
fedmsg.init(name="relay_inbound", cert_prefix="lookaside", **config)
topic = "lookaside.new"
- msg = dict(name=name, md5sum=checksum, filename=filename, agent=username)
+ msg = dict(name=name, md5sum=checksum, filename=filename,
+ agent=username, path=msgpath)
fedmsg.publish(modname="git", topic=topic, msg=msg)
except Exception as e:
print "Error with fedmsg", str(e)