From 33ea9998d1cd748649aa9b04f9273c5ff531fcf7 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Thu, 5 Feb 2015 18:33:58 +0100 Subject: [PATCH] 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. --- roles/distgit/files/dist-git-upload.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/distgit/files/dist-git-upload.cgi b/roles/distgit/files/dist-git-upload.cgi index 6610d8f305..3c5d874b1c 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)