[gnome-continuous-yocto/gnomeostree-3.28-rocko: 974/8267] classes/image: don't chdir when creating symlinks
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 974/8267] classes/image: don't chdir when creating symlinks
- Date: Sat, 16 Dec 2017 21:10:40 +0000 (UTC)
commit 6f7a3dc284eba0478eaf301f90560bbaaa85ba9f
Author: Ross Burton <ross burton intel com>
Date: Mon Jun 13 20:05:18 2016 +0100
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>
meta/classes/image.bbclass | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2577cca..61295f4 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -519,14 +519,13 @@ python create_symlinks() {
taskname = d.getVar("BB_CURRENTTASK", True)
subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
- os.chdir(deploy_dir)
if not link_name:
return
for type in subimages:
- dst = deploy_dir + "/" + link_name + "." + type
+ dst = os.path.join(deploy_dir, link_name + "." + 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))
if os.path.islink(dst):
if d.getVar('RM_OLD_IMAGE', True) == "1" and \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]