Skip to content

Commit

Permalink
Make init clones relocatable if using symlinks
Browse files Browse the repository at this point in the history
Complements #554.
  • Loading branch information
Dario Berzano authored and dberzano committed Nov 22, 2018
1 parent 59f62c6 commit 6fd9382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alibuild_helpers/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def doInit(args):

# Make it point relatively to the mirrors for relocation: as per Git specifics, the path has to
# be relative to the repository's `.git` directory. Don't do it if no common path is found
repoObjects = os.path.join(os.path.abspath(dest), ".git", "objects")
refObjects = os.path.join(os.path.abspath(args.referenceSources),
repoObjects = os.path.join(os.path.realpath(dest), ".git", "objects")
refObjects = os.path.join(os.path.realpath(args.referenceSources),
spec["package"].lower(), "objects")
repoAltConf = os.path.join(repoObjects, "info", "alternates")
if len(os.path.commonprefix([repoObjects, refObjects])) > 1:
Expand Down

0 comments on commit 6fd9382

Please sign in to comment.