]> code.ossystems Code Review - openembedded-core.git/commitdiff
license_image: Use new oe.path.copyhardlink() helper
authorPaul Barker <paul@betafive.co.uk>
Fri, 3 May 2019 11:54:48 +0000 (11:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 May 2019 09:46:04 +0000 (10:46 +0100)
This change allows us to support the placement of WORKDIR and DEPLOY_DIR
on different devices.

Signed-off-by: Paul Barker <paul@betafive.co.uk>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license_image.bbclass

index 67500386bf8b07bd90291aec8af255d68b965172..6fb76be48e21597608341e809449a00fc6357588 100644 (file)
@@ -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: