summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Gardenal <davidegarde2000@gmail.com>2022-06-06 12:51:42 +0200
committerSteve Sakoman <steve@sakoman.com>2022-06-09 06:15:19 -1000
commitfb4672a8b4090d0ea9b7931d1b04bccf7a81548c (patch)
tree1aa12cac57d9cd6848297dc0425555d7b122a771
parente30ef926e440b505e93e404c056034d86364a241 (diff)
downloadopenembedded-core-contrib-fb4672a8b4090d0ea9b7931d1b04bccf7a81548c.tar.gz
baremetal-image: fix broken symlink in do_rootfs
If IMAGE_LINK_NAME and IMAGE_MANIFEST are equal don't create a link otherwise it will create it to itself. Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8fd1a37c38dbfc688d840d12c61d76f151f9f605) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/baremetal-image.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/baremetal-image.bbclass b/meta/classes/baremetal-image.bbclass
index 81f5e5e93d..cb9e250350 100644
--- a/meta/classes/baremetal-image.bbclass
+++ b/meta/classes/baremetal-image.bbclass
@@ -47,9 +47,10 @@ python do_rootfs(){
Path(manifest_name).touch()
if os.path.exists(manifest_name) and link_name:
manifest_link = deploy_dir + "/" + link_name + ".manifest"
- if os.path.lexists(manifest_link):
- os.remove(manifest_link)
- os.symlink(os.path.basename(manifest_name), manifest_link)
+ if manifest_link != manifest_name:
+ if os.path.lexists(manifest_link):
+ os.remove(manifest_link)
+ os.symlink(os.path.basename(manifest_name), manifest_link)
# A lot of postprocess commands assume the existence of rootfs/etc
sysconfdir = d.getVar("IMAGE_ROOTFS") + d.getVar('sysconfdir')
bb.utils.mkdirhier(sysconfdir)