mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
qemuboot.bbclass: Prevent creating a link loop
When IMAGE_NAME and IMAGE_LINK_NAME are equal, do_write_qemuboot_conf will create a symlink that links to itself. Check if this is the case before creating the link. (From OE-Core rev: f46652e77f467861dc68c3a8e54f27d08659222d) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1f033e4442
commit
322985be23
@@ -114,7 +114,8 @@ python do_write_qemuboot_conf() {
|
|||||||
with open(qemuboot, 'w') as f:
|
with open(qemuboot, 'w') as f:
|
||||||
cf.write(f)
|
cf.write(f)
|
||||||
|
|
||||||
if os.path.lexists(qemuboot_link):
|
if qemuboot_link != qemuboot:
|
||||||
os.remove(qemuboot_link)
|
if os.path.lexists(qemuboot_link):
|
||||||
os.symlink(os.path.basename(qemuboot), qemuboot_link)
|
os.remove(qemuboot_link)
|
||||||
|
os.symlink(os.path.basename(qemuboot), qemuboot_link)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user