mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
bitbake/fetch2: Correctly handle git mirror tarball fetching
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -441,10 +441,11 @@ def try_mirrors(d, origud, mirrors, check = False):
|
|||||||
# We may be obtaining a mirror tarball which needs further processing by the real fetcher
|
# We may be obtaining a mirror tarball which needs further processing by the real fetcher
|
||||||
# If that tarball is a local file:// we need to provide a symlink to it
|
# If that tarball is a local file:// we need to provide a symlink to it
|
||||||
dldir = ld.getVar("DL_DIR", True)
|
dldir = ld.getVar("DL_DIR", True)
|
||||||
if not ud.localpath.startswith(dldir):
|
if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
|
||||||
if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
|
dest = os.path.join(dldir, os.path.basename(ud.localpath))
|
||||||
os.symlink(ud.localpath, os.path.join(dldir, os.path.basename(ud.localpath)))
|
if not os.path.exists(dest):
|
||||||
return None
|
os.symlink(ud.localpath, dest)
|
||||||
|
return None
|
||||||
# Otherwise the result is a local file:// and we symlink to it
|
# Otherwise the result is a local file:// and we symlink to it
|
||||||
if not os.path.exists(origud.localpath):
|
if not os.path.exists(origud.localpath):
|
||||||
os.symlink(ud.localpath, origud.localpath)
|
os.symlink(ud.localpath, origud.localpath)
|
||||||
|
|||||||
Reference in New Issue
Block a user