Browse Source

Use --no-preserve=ownership when copying

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Christopher Larson 4 years ago
parent
commit
093ef8d22c
2 changed files with 2 additions and 3 deletions
  1. 1 2
      classes/external-toolchain.bbclass
  2. 1 1
      lib/oe/external.py

+ 1 - 2
classes/external-toolchain.bbclass

@@ -88,7 +88,7 @@ python () {
         raise bb.parse.SkipPackage('No files found in external toolchain sysroot for: {}'.format(', '.join(search_patterns)))
 }
 
-python do_install () {
+fakeroot python do_install () {
     bb.build.exec_func('external_toolchain_do_install', d)
     pass # Sentinel
 }
@@ -124,7 +124,6 @@ python external_toolchain_do_install () {
     if 'do_install_extra' in d:
         bb.build.exec_func('do_install_extra', d)
     external_toolchain_propagate_mode(d, installdest)
-    subprocess.check_call(['chown', '-R', 'root:root', installdest])
 }
 external_toolchain_do_install[vardeps] += "${@' '.join('FILES_%s' % pkg for pkg in '${PACKAGES}'.split())}"
 

+ 1 - 1
lib/oe/external.py

@@ -66,7 +66,7 @@ def copy_from_sysroots(pathnames, sysroots, mirrors, installdest):
         else:
             destdir = oe.path.join(installdest, os.path.dirname(path))
             bb.utils.mkdirhier(destdir)
-            subprocess.check_call(['cp', '-pPR'] + list(files) + [destdir + '/'])
+            subprocess.check_call(['cp', '-PR', '--preserve=mode,timestamps', '--no-preserve=ownership'] + list(files) + [destdir + '/'])
             bb.note('Copied `{}`  to `{}/`'.format(', '.join(files), destdir))
 
 def expand_paths(pathnames, mirrors):