* [PATCH] lib/oe/package: Ensure strip breaks hardlinks
@ 2015-01-21 11:34 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-01-21 11:34 UTC (permalink / raw)
To: openembedded-core
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>
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index ea6feaa..7c728fc 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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-21 11:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 11:34 [PATCH] lib/oe/package: Ensure strip breaks hardlinks Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.