diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-21 11:34:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-11 17:40:08 +0000 |
commit | 6f79439ce478ce362fc1b5d60675710114060235 (patch) | |
tree | b23e8c56e3ac6370bfdc4612ef4ad0b5de8965de /meta | |
parent | 00af07c6b6e353152bc5cf5e7362d0b89c447ebc (diff) | |
download | poky-6f79439ce478ce362fc1b5d60675710114060235.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)
(From OE-Core rev: a7d0115d286e0b6c7d1f22a201e61a2360e40eb2)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 f8b532220a..a26a631837 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) |