aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@microsoft.com>2021-02-23 20:47:40 +0000
committerPaul Eggleton <paul.eggleton@linux.microsoft.com>2021-12-20 13:17:16 -0800
commitd34dfe66963424b77fe8913df8da60d884f5a43e (patch)
tree97a1c5a456d593d58aeea789aa42f8745f1362b3
parentf3b6f49c506eea679efc1b5d5840c8a0ba7f45f7 (diff)
downloadopenembedded-core-contrib-paule/kernel-symlinks.tar.gz
openembedded-core-contrib-paule/kernel-symlinks.tar.bz2
openembedded-core-contrib-paule/kernel-symlinks.zip
classes/qemuboot: allow IMAGE_LINK_NAME to be emptypaule/kernel-symlinks
If IMAGE_LINK_NAME is empty (supported everywhere else) then do not create the symlink for the .qemuboot file. Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
-rw-r--r--meta/classes/qemuboot.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 8cdb544a94..95cd1d6c4a 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -118,7 +118,10 @@ python do_write_qemuboot_conf() {
import configparser
qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME'))
- qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
+ if d.getVar('IMAGE_LINK_NAME'):
+ qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'))
+ else:
+ qemuboot_link = ""
finalpath = d.getVar("DEPLOY_DIR_IMAGE")
topdir = d.getVar('TOPDIR')
cf = configparser.ConfigParser()
@@ -153,7 +156,7 @@ python do_write_qemuboot_conf() {
with open(qemuboot, 'w') as f:
cf.write(f)
- if qemuboot_link != qemuboot:
+ if qemuboot_link and qemuboot_link != qemuboot:
if os.path.lexists(qemuboot_link):
os.remove(qemuboot_link)
os.symlink(os.path.basename(qemuboot), qemuboot_link)