summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-13 20:05:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 18:11:09 +0100
commit6f7a3dc284eba0478eaf301f90560bbaaa85ba9f (patch)
treeb4c8cadb22a100aee0c5526a0180a2f20ab26215 /meta
parent4e1a1040afee44b0e9b6c4727c66eb07522178d5 (diff)
downloadpoky-6f7a3dc284eba0478eaf301f90560bbaaa85ba9f.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2577cca733..61295f4bd7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -519,14 +519,13 @@ python create_symlinks() {
519 taskname = d.getVar("BB_CURRENTTASK", True) 519 taskname = d.getVar("BB_CURRENTTASK", True)
520 subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() 520 subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
521 imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.") 521 imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
522 os.chdir(deploy_dir)
523 522
524 if not link_name: 523 if not link_name:
525 return 524 return
526 for type in subimages: 525 for type in subimages:
527 dst = deploy_dir + "/" + link_name + "." + type 526 dst = os.path.join(deploy_dir, link_name + "." + type)
528 src = img_name + imgsuffix + type 527 src = img_name + imgsuffix + type
529 if os.path.exists(src): 528 if os.path.exists(os.path.join(deploy_dir, src)):
530 bb.note("Creating symlink: %s -> %s" % (dst, src)) 529 bb.note("Creating symlink: %s -> %s" % (dst, src))
531 if os.path.islink(dst): 530 if os.path.islink(dst):
532 if d.getVar('RM_OLD_IMAGE', True) == "1" and \ 531 if d.getVar('RM_OLD_IMAGE', True) == "1" and \