summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-09 12:35:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-09 12:36:22 +0000
commit4db8652250371cb01b87a416d3a3d200a9fc0812 (patch)
tree3229ec9bd01cdc36b47b8de2c160aab03ee6dc28 /bitbake
parent07e7579bf9d31a74b19c31977541361274282af4 (diff)
downloadpoky-4db8652250371cb01b87a416d3a3d200a9fc0812.tar.gz
bitbake: Revert "fetch2: use relative symlinks for anything pulled from PREMIRRORS"
This reverts commit 481e66ea8fc2fc91903127d66b0f1b0fe86baedb. Unfortunately this caused problems where incorrect paths were found in paths and files were not being found. This was reported on the mailing list but no invetigation or resolution was found. Revert until we can figure out what was wrong. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 290773072f..07b7ae41b4 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1021,8 +1021,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
1021 origud.method.build_mirror_data(origud, ld) 1021 origud.method.build_mirror_data(origud, ld)
1022 return origud.localpath 1022 return origud.localpath
1023 # Otherwise the result is a local file:// and we symlink to it 1023 # Otherwise the result is a local file:// and we symlink to it
1024 ensure_symlink(ud.localpath, origud.localpath, relative=True) 1024 ensure_symlink(ud.localpath, origud.localpath)
1025
1026 update_stamp(origud, ld) 1025 update_stamp(origud, ld)
1027 return ud.localpath 1026 return ud.localpath
1028 1027
@@ -1056,7 +1055,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
1056 bb.utils.unlockfile(lf) 1055 bb.utils.unlockfile(lf)
1057 1056
1058 1057
1059def ensure_symlink(target, link_name, relative=False): 1058def ensure_symlink(target, link_name):
1060 if not os.path.exists(link_name): 1059 if not os.path.exists(link_name):
1061 if os.path.islink(link_name): 1060 if os.path.islink(link_name):
1062 # Broken symbolic link 1061 # Broken symbolic link
@@ -1067,8 +1066,6 @@ def ensure_symlink(target, link_name, relative=False):
1067 # same time, in which case we do not want the second task to 1066 # same time, in which case we do not want the second task to
1068 # fail when the link has already been created by the first task. 1067 # fail when the link has already been created by the first task.
1069 try: 1068 try:
1070 if relative is True:
1071 target = os.path.relpath(target, os.path.dirname(link_name))
1072 os.symlink(target, link_name) 1069 os.symlink(target, link_name)
1073 except FileExistsError: 1070 except FileExistsError:
1074 pass 1071 pass