From: paul@betafive.co.uk
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/1] license_image: Don't try to hard link license files
Date: Thu, 2 May 2019 21:30:52 +0000 [thread overview]
Message-ID: <20190502213052.15962-2-paul@betafive.co.uk> (raw)
In-Reply-To: <20190502213052.15962-1-paul@betafive.co.uk>
From: Paul Barker <paul@betafive.co.uk>
This change allows us to support the placement of WORKDIR and DEPLOY_DIR
on different devices. As the license files are typically small, the
increase in disk usage and build time should be negligible.
Signed-off-by: Paul Barker <paul@betafive.co.uk>
---
meta/classes/license_image.bbclass | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index 67500386bf..655b56347f 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -37,6 +37,7 @@ python license_create_manifest() {
def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
import re
+ import shutil
import stat
bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split()
@@ -102,7 +103,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
rootfs_license_manifest = os.path.join(rootfs_license_dir,
os.path.split(license_manifest)[1])
if not os.path.exists(rootfs_license_manifest):
- os.link(license_manifest, rootfs_license_manifest)
+ shutil.copy(license_manifest, rootfs_license_manifest)
if copy_lic_dirs == "1":
for pkg in sorted(pkg_dic):
@@ -136,7 +137,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
continue
if not os.path.exists(rootfs_license):
- os.link(pkg_license, rootfs_license)
+ shutil.copy(pkg_license, rootfs_license)
if not os.path.exists(pkg_rootfs_license):
os.symlink(os.path.join('..', lic), pkg_rootfs_license)
@@ -146,7 +147,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
os.path.exists(pkg_rootfs_license)):
continue
- os.link(pkg_license, pkg_rootfs_license)
+ shutil.copy(pkg_license, pkg_rootfs_license)
# Fixup file ownership and permissions
for walkroot, dirs, files in os.walk(rootfs_license_dir):
for f in files:
--
2.17.1
next prev parent reply other threads:[~2019-05-02 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 21:30 [PATCH 0/1] license_image: Don't try to hard link license files paul
2019-05-02 21:30 ` paul [this message]
2019-05-03 5:05 ` [PATCH 1/1] " Richard Purdie
2019-05-03 7:05 ` Paul Barker
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=20190502213052.15962-2-paul@betafive.co.uk \
--to=paul@betafive.co.uk \
--cc=openembedded-core@lists.openembedded.org \
/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.