mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
classes/image: don't chdir when creating symlinks
There's no need to chdir() when creating image symlinks, and using chdir() changes the state for future tasks. (From OE-Core rev: 2fdf06fbe986d742f6bb13e9348b50e9aab03139) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4e1a1040af
commit
6f7a3dc284
@@ -519,14 +519,13 @@ python create_symlinks() {
|
|||||||
taskname = d.getVar("BB_CURRENTTASK", True)
|
taskname = d.getVar("BB_CURRENTTASK", True)
|
||||||
subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
|
subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
|
||||||
imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
|
imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
|
||||||
os.chdir(deploy_dir)
|
|
||||||
|
|
||||||
if not link_name:
|
if not link_name:
|
||||||
return
|
return
|
||||||
for type in subimages:
|
for type in subimages:
|
||||||
dst = deploy_dir + "/" + link_name + "." + type
|
dst = os.path.join(deploy_dir, link_name + "." + type)
|
||||||
src = img_name + imgsuffix + type
|
src = img_name + imgsuffix + type
|
||||||
if os.path.exists(src):
|
if os.path.exists(os.path.join(deploy_dir, src)):
|
||||||
bb.note("Creating symlink: %s -> %s" % (dst, src))
|
bb.note("Creating symlink: %s -> %s" % (dst, src))
|
||||||
if os.path.islink(dst):
|
if os.path.islink(dst):
|
||||||
if d.getVar('RM_OLD_IMAGE', True) == "1" and \
|
if d.getVar('RM_OLD_IMAGE', True) == "1" and \
|
||||||
|
|||||||
Reference in New Issue
Block a user