[oe-commits] Fabrice Coulon : meta/lib/oe/package.py: fix files ownership in packages

git at git.openembedded.org git at git.openembedded.org
Fri May 15 17:14:16 UTC 2015


Module: openembedded-core.git
Branch: dizzy
Commit: ad1a50a549377a0a74c51e20e53f146011e6c269
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ad1a50a549377a0a74c51e20e53f146011e6c269

Author: Fabrice Coulon <fabrice.coulon at axis.com>
Date:   Thu May 14 19:01:40 2015 +0100

meta/lib/oe/package.py: fix files ownership in packages

This fix solves the problem with the ownership of files in packages.
The do_install task was producing correct and expected output but when
the files were being put in, e.g. a rpm package, the ownership could
be different than that in the do_install task.

[YOCTO #7428]

(From OE-Core master rev: 1a50cc5aeafff0d8ee6c4a41dd2770ecd31455f0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Fabrice Coulon <fabrice.coulon at axis.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index a26a631..db8dc28 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -31,7 +31,7 @@ def runstrip(arg):
         extraflags = "--remove-section=.comment --remove-section=.note"
 
     # Use mv to break hardlinks
-    stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
+    stripcmd = "'%s' %s '%s' -o '%s.tmp' && chown --reference='%s' '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file, file, file)
     bb.debug(1, "runstrip: %s" % stripcmd)
 
     ret = subprocess.call(stripcmd, shell=True)



More information about the Openembedded-commits mailing list