update owner-sync-pkgdb to sync fedora teh same as epel
Signed-off-by: Dennis Gilmore <ausil@fedoraproject.org>
This commit is contained in:
parent
b05439b995
commit
44cbf8450f
1 changed files with 42 additions and 59 deletions
|
@ -27,10 +27,7 @@ if not BASEURL.endswith('/'):
|
|||
# Why do we have this? Seems insecure....
|
||||
sys.path.append('.')
|
||||
|
||||
try:
|
||||
import koji
|
||||
except:
|
||||
import brew as koji
|
||||
import koji
|
||||
|
||||
extraArchList = {'kernel': ('i586', 'i686', 'noarch'),
|
||||
'kernel-xen-2.6': ('i586', 'i686', 'noarch'),
|
||||
|
@ -82,7 +79,6 @@ if __name__ == '__main__':
|
|||
print "ERROR: no tag specified!\n"
|
||||
usage()
|
||||
|
||||
if tag.endswith('epel') or tag.startswith('epel'):
|
||||
if tag.startswith('epel'):
|
||||
version = tag.split('epel')[1]
|
||||
else:
|
||||
|
@ -100,15 +96,23 @@ if __name__ == '__main__':
|
|||
if tag.startswith('epel'):
|
||||
# Ex: epel7 => epel7
|
||||
reponame = tag
|
||||
else:
|
||||
arches = ["primary"]
|
||||
elif tag.endswith('epel'):
|
||||
# Ex: dist-6E-epel => el6
|
||||
reponame = 'el%s' % version
|
||||
arches = ["primary"]
|
||||
else:
|
||||
# Fedora
|
||||
reponame = tag
|
||||
{% if env == 'staging' %}
|
||||
arches = ["primary"]
|
||||
{% else %}
|
||||
arches = ["primary", "arm", "ppc", "s390"]
|
||||
{% endif %}
|
||||
if reponame not in branch_names:
|
||||
print 'tag %s => repo %s: does not seem to be a non-EOL branch' % (tag, reponame)
|
||||
sys.exit(1)
|
||||
|
||||
# EPEL needs a separate entry in koji for each epel version
|
||||
|
||||
data = requests.get(urljoin(BASEURL, 'api/vcs?format=json'), verify=VERIFY).json()
|
||||
acls = data['rpms']
|
||||
pkgs = {}
|
||||
|
@ -125,27 +129,6 @@ if __name__ == '__main__':
|
|||
else:
|
||||
pkgs[pkg_name] = 'orphan'
|
||||
pkgList = pkgs.keys()
|
||||
BuildEPEL = True
|
||||
arches = ["primary"]
|
||||
else:
|
||||
# Fedora only needs one entry per package for all Fedora releases
|
||||
# Use the owner from bugzilla for simplicity
|
||||
data = requests.get(urljoin(BASEURL, 'api/bugzilla?format=json'), verify=VERIFY).json()
|
||||
acls = data['bugzillaAcls']
|
||||
pkgList = acls['Fedora'].keys()
|
||||
pkgs = {}
|
||||
for pkg in acls['Fedora']:
|
||||
owner = acls['Fedora'][pkg]['owner']
|
||||
owner = owner.replace('group::', '').replace('@', '')
|
||||
pkgs[pkg] = owner
|
||||
|
||||
#pkgs = dict(((p, acls['Fedora'][p]['owner']) for p in acls['Fedora']))
|
||||
BuildEPEL = False
|
||||
{% if env == 'staging' %}
|
||||
arches = ["primary"]
|
||||
{% else %}
|
||||
arches = ["primary", "arm", "ppc", "s390"]
|
||||
{% endif %}
|
||||
pkgList.sort()
|
||||
|
||||
options = get_options()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue