mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 15:02:54 +00:00
move fedmsgs, nomd5, old_paths config options to [upload] ini section
This commit is contained in:
parent
6381aa3461
commit
e0b629ab8c
2 changed files with 7 additions and 5 deletions
|
@ -7,8 +7,10 @@ gitroot_dir = /var/lib/dist-git/git
|
|||
|
||||
gitolite = True
|
||||
grok = True
|
||||
|
||||
default_namespace = rpms
|
||||
|
||||
[upload]
|
||||
fedmsgs = True
|
||||
old_paths = True
|
||||
nomd5 = True
|
||||
|
||||
default_namespace = rpms
|
||||
|
|
|
@ -209,7 +209,7 @@ def main():
|
|||
print 'Missing'
|
||||
|
||||
sys.exit(0)
|
||||
elif hash_type == "md5" and config['dist-git'].getboolean('nomd5', fallback=True):
|
||||
elif hash_type == "md5" and config['upload'].getboolean('nomd5', fallback=True):
|
||||
send_error('Uploads with md5 are no longer allowed.',
|
||||
status='406 Not Acceptable')
|
||||
|
||||
|
@ -253,11 +253,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" and config['dist-git'].getboolean('old_paths', fallback=True):
|
||||
if hash_type == "md5" and config['upload'].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):
|
||||
if config['upload'].getboolean('fedmsgs', fallback=True):
|
||||
try:
|
||||
config = fedmsg.config.load_config([], None)
|
||||
config['active'] = True
|
||||
|
|
Loading…
Add table
Reference in a new issue