diff mbox series

[02/21] create-spdx-2.2.bbclass: use hardlink as well

Message ID b3a6626a8d7a5b20bcb78093cfe4d64ed7c7b30c.1700600804.git.martin.jansa@gmail.com
State New
Headers show
Series [01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links | expand

Commit Message

Martin Jansa Nov. 22, 2023, 12:44 p.m. UTC
[YOCTO #12937]

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 meta/classes/create-spdx-2.2.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Kjellerstedt Nov. 22, 2023, 5:17 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Martin Jansa
> Sent: den 22 november 2023 13:45
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well

This commit message does not make much sense, unless you also read the 
one for the preceding commit, which you won't do if you run something 
like `git log meta/classes/create-spdx-2.2.bbclass`.

//Peter

> 
> [YOCTO #12937]
> 
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>  meta/classes/create-spdx-2.2.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-
> spdx-2.2.bbclass
> index b0aef80db1..8c77f6b886 100644
> --- a/meta/classes/create-spdx-2.2.bbclass
> +++ b/meta/classes/create-spdx-2.2.bbclass
> @@ -967,7 +967,7 @@ python image_combine_spdx() {
>          if image_link_name:
>              link = imgdeploydir / (image_link_name + suffix)
>              if link != target_path:
> -                link.symlink_to(os.path.relpath(target_path,
> link.parent))
> +                os.link(target_path, link)
> 
>      spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst")
>      make_image_link(spdx_tar_path, ".spdx.tar.zst")
> --
> 2.43.0
diff mbox series

Patch

diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index b0aef80db1..8c77f6b886 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -967,7 +967,7 @@  python image_combine_spdx() {
         if image_link_name:
             link = imgdeploydir / (image_link_name + suffix)
             if link != target_path:
-                link.symlink_to(os.path.relpath(target_path, link.parent))
+                os.link(target_path, link)
 
     spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst")
     make_image_link(spdx_tar_path, ".spdx.tar.zst")