[OE-core] [PATCH v2 2/2] license_image: Use new oe.path.copyhardlink() helper
paul at betafive.co.uk
paul at betafive.co.uk
Fri May 3 11:54:48 UTC 2019
From: Paul Barker <paul at betafive.co.uk>
This change allows us to support the placement of WORKDIR and DEPLOY_DIR
on different devices.
Signed-off-by: Paul Barker <paul at betafive.co.uk>
---
meta/classes/license_image.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index 67500386bf..6fb76be48e 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -102,7 +102,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)
+ oe.path.copyhardlink(license_manifest, rootfs_license_manifest)
if copy_lic_dirs == "1":
for pkg in sorted(pkg_dic):
@@ -136,7 +136,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)
+ oe.path.copyhardlink(pkg_license, rootfs_license)
if not os.path.exists(pkg_rootfs_license):
os.symlink(os.path.join('..', lic), pkg_rootfs_license)
@@ -146,7 +146,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)
+ oe.path.copyhardlink(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
More information about the Openembedded-core
mailing list