From 4db8652250371cb01b87a416d3a3d200a9fc0812 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 9 Dec 2020 12:35:10 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'bitbake') 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): origud.method.build_mirror_data(origud, ld) return origud.localpath # Otherwise the result is a local file:// and we symlink to it - ensure_symlink(ud.localpath, origud.localpath, relative=True) - + ensure_symlink(ud.localpath, origud.localpath) update_stamp(origud, ld) return ud.localpath @@ -1056,7 +1055,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): bb.utils.unlockfile(lf) -def ensure_symlink(target, link_name, relative=False): +def ensure_symlink(target, link_name): if not os.path.exists(link_name): if os.path.islink(link_name): # Broken symbolic link @@ -1067,8 +1066,6 @@ def ensure_symlink(target, link_name, relative=False): # same time, in which case we do not want the second task to # fail when the link has already been created by the first task. try: - if relative is True: - target = os.path.relpath(target, os.path.dirname(link_name)) os.symlink(target, link_name) except FileExistsError: pass -- cgit v1.2.3-54-g00ecf