Only symlink if there isn't already one

This commit is contained in:
Pierre-Yves Chibon 2015-12-18 17:13:35 +01:00
parent 76cc69c4a9
commit d29eec75ab

View file

@ -220,7 +220,8 @@ def branch_package(ns, pkgname, requested_branches, existing_branches):
_invoke(SETUP_PACKAGE, [os.path.join(ns, pkgname)])
if ns == 'rpms':
old_place = os.path.join(GIT_FOLDER, '%s.git' % pkgname)
os.symlink(new_place, old_place)
if not os.path.exists(old_place):
os.symlink(new_place, old_place)
# SETUP_PACKAGE creates master
if 'master' in requested_branches:
requested_branches.remove('master')