50 lines
2.2 KiB
Diff
50 lines
2.2 KiB
Diff
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
|
|
index 67acc278d1..2c94478fce 100644
|
|
--- a/meta/classes/package.bbclass
|
|
+++ b/meta/classes/package.bbclass
|
|
@@ -855,17 +855,24 @@ python package_do_split_locales() {
|
|
}
|
|
|
|
python perform_packagecopy () {
|
|
- import subprocess
|
|
import shutil
|
|
+ import os
|
|
|
|
dest = d.getVar('D')
|
|
dvar = d.getVar('PKGD')
|
|
|
|
# Start by package population by taking a copy of the installed
|
|
- # files to operate on
|
|
- # Preserve sparse files and hard links
|
|
- cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
|
|
- subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
|
|
+ # files to operate on. The original tar|tar copy path can fail on some
|
|
+ # host/pseudo combinations with "got *at() syscall for unknown directory".
|
|
+ for entry in os.listdir(dest):
|
|
+ if entry == 'sysroot-only':
|
|
+ continue
|
|
+ src = os.path.join(dest, entry)
|
|
+ dst = os.path.join(dvar, entry)
|
|
+ if os.path.isdir(src) and not os.path.islink(src):
|
|
+ shutil.copytree(src, dst, symlinks=True)
|
|
+ else:
|
|
+ shutil.copy2(src, dst, follow_symlinks=False)
|
|
|
|
# replace RPATHs for the nativesdk binaries, to make them relocatable
|
|
if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d):
|
|
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
|
|
index 9fe3c52fae..2dfce3c163 100644
|
|
--- a/meta/classes/package_ipk.bbclass
|
|
+++ b/meta/classes/package_ipk.bbclass
|
|
@@ -229,8 +229,8 @@ def ipk_write_pkg(pkg, d):
|
|
conffiles.close()
|
|
|
|
os.chdir(basedir)
|
|
- subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"),
|
|
- d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir),
|
|
+ subprocess.check_output("PSEUDO_UNLOAD=1 PATH=\"%s\" %s -o 0 -g 0 %s %s" % (localdata.getVar("PATH"),
|
|
+ d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir),
|
|
stderr=subprocess.STDOUT,
|
|
shell=True)
|
|
|