add 'fedmsgs' and 'old_paths' configuration variables

This commit is contained in:
clime 2018-01-13 23:53:30 +01:00
parent d40a3489eb
commit 8f08d577b0
2 changed files with 22 additions and 17 deletions

View file

@ -4,5 +4,9 @@ git_author_email = rel-eng@lists.fedoraproject.org
cache_dir = /var/lib/dist-git/cache
gitroot_dir = /var/lib/dist-git/git
gitolite = True
grok = True
fedmsgs = True
old_paths = True
nomd5 = True

View file

@ -238,10 +238,11 @@ def main():
hash_type.upper(), checksum)
# Add the file to the old path, where fedpkg is currently looking for it
if hash_type == "md5":
if hash_type == "md5" and config['dist-git'].getboolean('old_paths', fallback=True):
hardlink(dest_file, old_path, username)
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
if config['dist-git'].getboolean('fedmsgs', fallback=True):
try:
config = fedmsg.config.load_config([], None)
config['active'] = True