mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
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>
This commit is contained in:
parent
00af07c6b6
commit
6f79439ce4
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user