diff options
| author | Paul Eggleton <paul.eggleton@microsoft.com> | 2021-12-20 13:58:24 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-22 23:11:45 +0000 |
| commit | 9eb8c5195e622dffe53b3c25432afc4db4985477 (patch) | |
| tree | ad23a12ba93f0499c39a31b9dfd197a49cb78763 | |
| parent | a2eb528b63b0c53daab31308a6afdcb605ac5f40 (diff) | |
| download | poky-9eb8c5195e622dffe53b3c25432afc4db4985477.tar.gz | |
classes/qemuboot: allow IMAGE_LINK_NAME to be empty
If IMAGE_LINK_NAME is empty (supported everywhere else) then do not
create the symlink for the .qemuboot file.
(From OE-Core rev: 9b19845c0506949ca61965fb92fb3f337062f377)
Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/qemuboot.bbclass | 7 |
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() { | |||
| 118 | import configparser | 118 | import configparser |
| 119 | 119 | ||
| 120 | qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME')) | 120 | qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_NAME')) |
| 121 | qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME')) | 121 | if d.getVar('IMAGE_LINK_NAME'): |
| 122 | qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME')) | ||
| 123 | else: | ||
| 124 | qemuboot_link = "" | ||
| 122 | finalpath = d.getVar("DEPLOY_DIR_IMAGE") | 125 | finalpath = d.getVar("DEPLOY_DIR_IMAGE") |
| 123 | topdir = d.getVar('TOPDIR') | 126 | topdir = d.getVar('TOPDIR') |
| 124 | cf = configparser.ConfigParser() | 127 | cf = configparser.ConfigParser() |
| @@ -153,7 +156,7 @@ python do_write_qemuboot_conf() { | |||
| 153 | with open(qemuboot, 'w') as f: | 156 | with open(qemuboot, 'w') as f: |
| 154 | cf.write(f) | 157 | cf.write(f) |
| 155 | 158 | ||
| 156 | if qemuboot_link != qemuboot: | 159 | if qemuboot_link and qemuboot_link != qemuboot: |
| 157 | if os.path.lexists(qemuboot_link): | 160 | if os.path.lexists(qemuboot_link): |
| 158 | os.remove(qemuboot_link) | 161 | os.remove(qemuboot_link) |
| 159 | os.symlink(os.path.basename(qemuboot), qemuboot_link) | 162 | os.symlink(os.path.basename(qemuboot), qemuboot_link) |
