]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/qemuboot: allow IMAGE_LINK_NAME to be empty
authorPaul Eggleton <paul.eggleton@microsoft.com>
Mon, 20 Dec 2021 21:58:24 +0000 (13:58 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Dec 2021 23:09:22 +0000 (23:09 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/qemuboot.bbclass

index 8cdb544a94d460d99f693e20ba0a504717cf42ea..95cd1d6c4ad6f4632adeade90ed8bc5620460089 100644 (file)
@@ -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)