From a3acf5ecb34d51e0c9170b7c1a970dab37f55ddc Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 18 Aug 2017 15:53:12 +0000 Subject: [PATCH] s/repo_name/branch/ makes it more clear what's going on. --- .../backend/templates/owner-sync-pagure.j2 | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/bodhi2/backend/templates/owner-sync-pagure.j2 b/roles/bodhi2/backend/templates/owner-sync-pagure.j2 index 2eb0852ec3..7bfbd6d24e 100755 --- a/roles/bodhi2/backend/templates/owner-sync-pagure.j2 +++ b/roles/bodhi2/backend/templates/owner-sync-pagure.j2 @@ -143,24 +143,24 @@ def get_namespace_and_version_from_tag(tag): return namespace, version -def get_repo_name_and_arches(tag, version): +def get_branch_and_arches(tag, version): if tag.startswith('epel'): # Ex: epel7 => epel7 - repo_name = tag + branch = tag arches = ["primary"] elif tag.endswith('epel'): # Ex: dist-6E-epel => el6 - repo_name = 'el%s' % version + branch = 'el%s' % version arches = ["primary"] elif tag == 'module-package-list': - repo_name = 'master' + branch = 'master' arches = ["primary"] else: # Fedora if version == RAWHIDE: - repo_name = 'master' + branch = 'master' else: - repo_name = tag.split('-')[0] + branch = tag.split('-')[0] if STAGING: arches = ["primary"] @@ -173,7 +173,7 @@ def get_repo_name_and_arches(tag, version): # Yay! Everything in primary. arches = ["primary"] - return repo_name, arches + return branch, arches def get_pdc_project_name_and_branch(session, namespace, project_name, @@ -360,11 +360,11 @@ if __name__ == '__main__': tag_info = {} for tag in tags: 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] = { 'namespace': namespace, 'version': version, - 'repo_name': repo_name, + 'branch': branch, 'arches': arches } unique_namespaces.add(namespace) @@ -386,7 +386,7 @@ if __name__ == '__main__': pkgs = [] for pkg, branches in namespace_to_projects[namespace].items(): # 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) # This is a special project, not in dist-git, but which needs to be in # the package list.