summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-21 11:34:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:35:28 +0000
commit7c0fd561bad0250a00cef63e3d787573112a59cf (patch)
tree72e86d52fc9b998eff376eca059eb40905c2ebc2 /meta
parent27dbacdb88ee3e79f4c95a779d8a7e8c5c8f941d (diff)
downloadopenembedded-core-7c0fd561bad0250a00cef63e3d787573112a59cf.tar.gz
openembedded-core-7c0fd561bad0250a00cef63e3d787573112a59cf.tar.bz2
openembedded-core-7c0fd561bad0250a00cef63e3d787573112a59cf.zip
lib/oe/package: Ensure strip breaks hardlinks
Normally, strip preserves hardlinks which in the case of the way our hardlink rather than copy functionality works, is a disadvantage and leads to non-deterministic builds. This adds a move into place after the strip operation to ensure hardlinks are broken and we bring back build determinism. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index ea6feaaea4..7c728fcd23 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -30,7 +30,8 @@ def runstrip(arg):
elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
- stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ # Use mv to break hardlinks
+ stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
bb.debug(1, "runstrip: %s" % stripcmd)
ret = subprocess.call(stripcmd, shell=True)