summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--poky/bitbake/lib/bb/fetch2/__init__.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py
index 551bfb70f2..290773072f 100644
--- a/poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/poky/bitbake/lib/bb/fetch2/__init__.py
@@ -853,11 +853,6 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
if val:
cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
- # Ensure that a _PYTHON_SYSCONFIGDATA_NAME value set by a recipe
- # (for example via python3native.bbclass since warrior) is not set for
- # host Python (otherwise tools like git-make-shallow will fail)
- cmd = 'unset _PYTHON_SYSCONFIGDATA_NAME; ' + cmd
-
# Disable pseudo as it may affect ssh, potentially causing it to hang.
cmd = 'export PSEUDO_DISABLED=1; ' + cmd
@@ -1026,7 +1021,8 @@ 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)
+ ensure_symlink(ud.localpath, origud.localpath, relative=True)
+
update_stamp(origud, ld)
return ud.localpath
@@ -1060,7 +1056,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
bb.utils.unlockfile(lf)
-def ensure_symlink(target, link_name):
+def ensure_symlink(target, link_name, relative=False):
if not os.path.exists(link_name):
if os.path.islink(link_name):
# Broken symbolic link
@@ -1071,6 +1067,8 @@ def ensure_symlink(target, link_name):
# 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
@@ -1461,6 +1459,10 @@ class FetchMethod(object):
cmd = '7z x -so %s | tar x --no-same-owner -f -' % file
elif file.endswith('.7z'):
cmd = '7za x -y %s 1>/dev/null' % file
+ elif file.endswith('.tzst') or file.endswith('.tar.zst'):
+ cmd = 'zstd --decompress --stdout %s | tar x --no-same-owner -f -' % file
+ elif file.endswith('.zst'):
+ cmd = 'zstd --decompress --stdout %s > %s' % (file, efile)
elif file.endswith('.zip') or file.endswith('.jar'):
try:
dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)