diff options
author | Davide Gardenal <davidegarde2000@gmail.com> | 2022-06-06 12:51:42 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-07 21:21:54 +0100 |
commit | e55d15d2fbdadc41e860293eba203c829718aa1b (patch) | |
tree | 07fc9790374d633c2885f701e07421a4a9e312df /meta/classes/baremetal-image.bbclass | |
parent | 137c0a740471370f9129cb499c7025b4ebefe515 (diff) | |
download | poky-e55d15d2fbdadc41e860293eba203c829718aa1b.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.
(From OE-Core rev: 8fd1a37c38dbfc688d840d12c61d76f151f9f605)
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>
Diffstat (limited to 'meta/classes/baremetal-image.bbclass')
-rw-r--r-- | meta/classes/baremetal-image.bbclass | 7 |
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(){ | |||
47 | Path(manifest_name).touch() | 47 | Path(manifest_name).touch() |
48 | if os.path.exists(manifest_name) and link_name: | 48 | if os.path.exists(manifest_name) and link_name: |
49 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | 49 | manifest_link = deploy_dir + "/" + link_name + ".manifest" |
50 | if os.path.lexists(manifest_link): | 50 | if manifest_link != manifest_name: |
51 | os.remove(manifest_link) | 51 | if os.path.lexists(manifest_link): |
52 | os.symlink(os.path.basename(manifest_name), manifest_link) | 52 | os.remove(manifest_link) |
53 | os.symlink(os.path.basename(manifest_name), manifest_link) | ||
53 | # A lot of postprocess commands assume the existence of rootfs/etc | 54 | # A lot of postprocess commands assume the existence of rootfs/etc |
54 | sysconfdir = d.getVar("IMAGE_ROOTFS") + d.getVar('sysconfdir') | 55 | sysconfdir = d.getVar("IMAGE_ROOTFS") + d.getVar('sysconfdir') |
55 | bb.utils.mkdirhier(sysconfdir) | 56 | bb.utils.mkdirhier(sysconfdir) |