From 1dff3ce6550a5065084364cc177808c5f6d8a28d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 17 Dec 2015 17:44:49 +0100 Subject: [PATCH] Fix symlinking the new repo to the old location --- roles/distgit/templates/pkgdb_sync_git_branches.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index 24d15f2b20..d47e6200a3 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -212,14 +212,15 @@ def branch_package(ns, pkgname, requested_branches, existing_branches): print 'Fixing package %s for branches %s' % (pkgname, requested_branches) # Create the devel branch if necessary - exists = os.path.exists(os.path.join(GIT_FOLDER, ns, '%s.git' % pkgname)) + new_place = os.path.join(GIT_FOLDER, ns, '%s.git' % pkgname) + exists = os.path.exists(new_place) if not exists or 'master' not in existing_branches: if not TEST_ONLY: _invoke(SETUP_PACKAGE, [os.path.join(ns, pkgname)]) if ns == 'rpms': - old_place = os.path.exists(os.path.join( - GIT_FOLDER, '%s.git' % pkgname)) - os.symlink(exists, old_place) + old_place = os.path.join( + GIT_FOLDER, '%s.git' % pkgname) + os.symlink(new_place, old_place) # SETUP_PACKAGE creates master if 'master' in requested_branches: requested_branches.remove('master')