summaryrefslogtreecommitdiff
path: root/bin/bootstrap-traverser.py
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-04-18 12:28:14 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-04-18 12:44:24 +0200
commitc228f58a7d2ae3cfd606a591bdbd6bbeba0484b5 (patch)
tree8c03af667f0696cfca2d55c09e43448263d120ca /bin/bootstrap-traverser.py
parent6490028cfb4b57eee115e9480f45be07c6ae2e02 (diff)
downloadjustbuild-c228f58a7d2ae3cfd606a591bdbd6bbeba0484b5.tar.gz
bootstrap traverser: prefer hard over symlinks
... as in this way, the setup is more close to the one used in our build tool. In particular, tools that search for auxilliary files relativ to their own location get confused less.
Diffstat (limited to 'bin/bootstrap-traverser.py')
-rwxr-xr-xbin/bootstrap-traverser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/bootstrap-traverser.py b/bin/bootstrap-traverser.py
index d2961312..a58abb04 100755
--- a/bin/bootstrap-traverser.py
+++ b/bin/bootstrap-traverser.py
@@ -50,7 +50,10 @@ def build_known(desc, *, root):
def link(src, dest):
dest = os.path.normpath(dest)
os.makedirs(os.path.dirname(dest), exist_ok=True)
- os.symlink(src, dest)
+ try:
+ os.link(src, dest)
+ except:
+ os.symlink(src, dest)
def build_local(desc, *, root, config):
repo_name = desc["data"]["repository"]