diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-21 11:34:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-23 11:36:31 +0000 |
commit | 8bab098c36e2a10107b368dc94448c536a536e40 (patch) | |
tree | 0217049a99723b6198677bd717d246c4bd6e8209 | |
parent | 7f58a85337a0712802bdb604a58985a8800b6477 (diff) | |
download | poky-8bab098c36e2a10107b368dc94448c536a536e40.tar.gz |
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.
(From OE-Core rev: 7c0fd561bad0250a00cef63e3d787573112a59cf)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oe/package.py | 3 |
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): | |||
30 | elif elftype & 8 or elftype & 4: | 30 | elif elftype & 8 or elftype & 4: |
31 | extraflags = "--remove-section=.comment --remove-section=.note" | 31 | extraflags = "--remove-section=.comment --remove-section=.note" |
32 | 32 | ||
33 | stripcmd = "'%s' %s '%s'" % (strip, extraflags, file) | 33 | # Use mv to break hardlinks |
34 | stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file) | ||
34 | bb.debug(1, "runstrip: %s" % stripcmd) | 35 | bb.debug(1, "runstrip: %s" % stripcmd) |
35 | 36 | ||
36 | ret = subprocess.call(stripcmd, shell=True) | 37 | ret = subprocess.call(stripcmd, shell=True) |