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
|
gitolite = True
|
||||||
grok = True
|
grok = True
|
||||||
|
|
||||||
|
default_namespace = rpms
|
||||||
|
|
||||||
|
[upload]
|
||||||
fedmsgs = True
|
fedmsgs = True
|
||||||
old_paths = True
|
old_paths = True
|
||||||
nomd5 = True
|
nomd5 = True
|
||||||
|
|
||||||
default_namespace = rpms
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ def main():
|
||||||
print 'Missing'
|
print 'Missing'
|
||||||
|
|
||||||
sys.exit(0)
|
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.',
|
send_error('Uploads with md5 are no longer allowed.',
|
||||||
status='406 Not Acceptable')
|
status='406 Not Acceptable')
|
||||||
|
|
||||||
|
@ -253,11 +253,11 @@ def main():
|
||||||
hash_type.upper(), checksum)
|
hash_type.upper(), checksum)
|
||||||
|
|
||||||
# Add the file to the old path, where fedpkg is currently looking for it
|
# 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)
|
hardlink(dest_file, old_path, username)
|
||||||
|
|
||||||
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
# 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:
|
try:
|
||||||
config = fedmsg.config.load_config([], None)
|
config = fedmsg.config.load_config([], None)
|
||||||
config['active'] = True
|
config['active'] = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue