diff --git a/roles/distgit/tasks/main.yml b/roles/distgit/tasks/main.yml index 608a0e0e95..0eca9584a1 100644 --- a/roles/distgit/tasks/main.yml +++ b/roles/distgit/tasks/main.yml @@ -141,7 +141,6 @@ - setup_git_package - mkbranch - mkbranch_branching - - pkgdb2-clone tags: - config - distgit @@ -178,10 +177,11 @@ tags: - distgit -- name: install the pkgdb_sync_git_branches.py scripts +- name: install the pkgdb_sync_git_branches.py and pkgdb2-clone scripts template: src={{item}} dest=/usr/local/bin/{{item}} owner=root group=root mode=0755 with_items: - pkgdb_sync_git_branches.py + - pkgdb2-clone tags: - config - distgit diff --git a/roles/distgit/files/pkgdb2-clone b/roles/distgit/templates/pkgdb2-clone similarity index 97% rename from roles/distgit/files/pkgdb2-clone rename to roles/distgit/templates/pkgdb2-clone index daa7d88644..110cbb0386 100644 --- a/roles/distgit/files/pkgdb2-clone +++ b/roles/distgit/templates/pkgdb2-clone @@ -13,6 +13,12 @@ NEW_EPEL_VERSION = '7' NEW_EPEL_SOURCE_BRANCH = 'f19' RHEL_PKGS_PATH = '/var/lib/rhel/rhel' + NEW_EPEL_VERSION +{% if env == 'staging' -%} +MKBRANCH = '/usr/share/dist-git/mkbranch' +{%- else -%} +MKBRANCH = '/usr/local/bin/mkbranch' +{%- endif %} + # parse_page :: String -> IO (Map String String) # This returns a dictionary of {"pkg_name": "branch"} def parse_page(url): @@ -140,7 +146,7 @@ def main(args): "name, " + src_branchname + " -> " + dest_branchname else: if process_package(pkgdb, key, src_branchname, dest_branchname): - subprocess.call(["mkbranch", + subprocess.call([MKBRANCH, "-s", NEW_EPEL_SOURCE_BRANCH, "epel" + NEW_EPEL_VERSION, diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index f3d1d641d3..cef9d89365 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -70,8 +70,17 @@ PKGDB_URL = 'https://admin.fedoraproject.org/pkgdb' GIT_FOLDER = '/srv/git/repositories/' +{% if env == 'staging' -%} +MKBRANCH = '/usr/share/dist-git/mkbranch' +{%- else -%} MKBRANCH = '/usr/local/bin/mkbranch' +{%- endif %} + +{% if env == 'staging' -%} +SETUP_PACKAGE = '/usr/share/dist-git/setup_git_package' +{%- else -%} SETUP_PACKAGE = '/usr/local/bin/setup_git_package' +{%- endif %} THREADS = 20 VERBOSE = False