All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Reto Schneider" <code@reto-schneider.ch>
To: openembedded-core@lists.openembedded.org
Cc: Reto Schneider <reto.schneider@husqvarnagroup.com>
Subject: [PATCH 2/2] license_image.bbclass: Fix symlink to generic license files
Date: Mon, 26 Apr 2021 22:48:28 +0200	[thread overview]
Message-ID: <20210426204828.12339-2-code@reto-schneider.ch> (raw)
In-Reply-To: <20210426204828.12339-1-code@reto-schneider.ch>

From: Reto Schneider <reto.schneider@husqvarnagroup.com>

Link to the canonical filename of a license as only this one exists.

Fixes commit 70fe71dd18ea675f35581db4a61fda137f8bf
[license_image.bbclass: use canonical name for license files].

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
---
 meta/classes/license_image.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index b9a0f2359b..73cebb4d55 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -144,12 +144,13 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
                             continue
 
                         # Make sure we use only canonical name for the license file
-                        rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic)
+                        generic_lic_file = "generic_%s" % generic_lic
+                        rootfs_license = os.path.join(rootfs_license_dir, generic_lic_file)
                         if not os.path.exists(rootfs_license):
                             oe.path.copyhardlink(pkg_license, rootfs_license)
 
                         if not os.path.exists(pkg_rootfs_license):
-                            os.symlink(os.path.join('..', lic), pkg_rootfs_license)
+                            os.symlink(os.path.join('..', generic_lic_file), pkg_rootfs_license)
                     else:
                         if (oe.license.license_ok(canonical_license(d,
                                 lic), bad_licenses) == False or
-- 
2.29.2


      reply	other threads:[~2021-04-26 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 20:48 [PATCH 1/2] license_image.bbclass: Detect broken symlinks code
2021-04-26 20:48 ` Reto Schneider [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210426204828.12339-2-code@reto-schneider.ch \
    --to=code@reto-schneider.ch \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=reto.schneider@husqvarnagroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.