s/repo_name/branch/ makes it more clear what's going on.
This commit is contained in:
parent
65aacfb98b
commit
a3acf5ecb3
1 changed files with 10 additions and 10 deletions
|
@ -143,24 +143,24 @@ def get_namespace_and_version_from_tag(tag):
|
||||||
return namespace, version
|
return namespace, version
|
||||||
|
|
||||||
|
|
||||||
def get_repo_name_and_arches(tag, version):
|
def get_branch_and_arches(tag, version):
|
||||||
if tag.startswith('epel'):
|
if tag.startswith('epel'):
|
||||||
# Ex: epel7 => epel7
|
# Ex: epel7 => epel7
|
||||||
repo_name = tag
|
branch = tag
|
||||||
arches = ["primary"]
|
arches = ["primary"]
|
||||||
elif tag.endswith('epel'):
|
elif tag.endswith('epel'):
|
||||||
# Ex: dist-6E-epel => el6
|
# Ex: dist-6E-epel => el6
|
||||||
repo_name = 'el%s' % version
|
branch = 'el%s' % version
|
||||||
arches = ["primary"]
|
arches = ["primary"]
|
||||||
elif tag == 'module-package-list':
|
elif tag == 'module-package-list':
|
||||||
repo_name = 'master'
|
branch = 'master'
|
||||||
arches = ["primary"]
|
arches = ["primary"]
|
||||||
else:
|
else:
|
||||||
# Fedora
|
# Fedora
|
||||||
if version == RAWHIDE:
|
if version == RAWHIDE:
|
||||||
repo_name = 'master'
|
branch = 'master'
|
||||||
else:
|
else:
|
||||||
repo_name = tag.split('-')[0]
|
branch = tag.split('-')[0]
|
||||||
|
|
||||||
if STAGING:
|
if STAGING:
|
||||||
arches = ["primary"]
|
arches = ["primary"]
|
||||||
|
@ -173,7 +173,7 @@ def get_repo_name_and_arches(tag, version):
|
||||||
# Yay! Everything in primary.
|
# Yay! Everything in primary.
|
||||||
arches = ["primary"]
|
arches = ["primary"]
|
||||||
|
|
||||||
return repo_name, arches
|
return branch, arches
|
||||||
|
|
||||||
|
|
||||||
def get_pdc_project_name_and_branch(session, namespace, project_name,
|
def get_pdc_project_name_and_branch(session, namespace, project_name,
|
||||||
|
@ -360,11 +360,11 @@ if __name__ == '__main__':
|
||||||
tag_info = {}
|
tag_info = {}
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
namespace, version = get_namespace_and_version_from_tag(tag)
|
namespace, version = get_namespace_and_version_from_tag(tag)
|
||||||
repo_name, arches = get_repo_name_and_arches(tag, version)
|
branch, arches = get_branch_and_arches(tag, version)
|
||||||
tag_info[tag] = {
|
tag_info[tag] = {
|
||||||
'namespace': namespace,
|
'namespace': namespace,
|
||||||
'version': version,
|
'version': version,
|
||||||
'repo_name': repo_name,
|
'branch': branch,
|
||||||
'arches': arches
|
'arches': arches
|
||||||
}
|
}
|
||||||
unique_namespaces.add(namespace)
|
unique_namespaces.add(namespace)
|
||||||
|
@ -386,7 +386,7 @@ if __name__ == '__main__':
|
||||||
pkgs = []
|
pkgs = []
|
||||||
for pkg, branches in namespace_to_projects[namespace].items():
|
for pkg, branches in namespace_to_projects[namespace].items():
|
||||||
# The tag and branch names are the same for "old-style" branches
|
# The tag and branch names are the same for "old-style" branches
|
||||||
if info['repo_name'] in branches or tag == ('f' + RAWHIDE):
|
if info['branch'] in branches or tag == ('f' + RAWHIDE):
|
||||||
pkgs.append(pkg)
|
pkgs.append(pkg)
|
||||||
# This is a special project, not in dist-git, but which needs to be in
|
# This is a special project, not in dist-git, but which needs to be in
|
||||||
# the package list.
|
# the package list.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue