diff options
| -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) |
