stdenv: In the fixupPhase, make the output writable first

Cherry-picked from 1d11c1dc48 in the
multiple-outputs branch.
This commit is contained in:
Eelco Dolstra 2014-01-14 14:13:31 +01:00
parent 9c582619c6
commit 5ad0728dfc

View File

@ -288,9 +288,6 @@ stripDirs() {
if [ -n "${dirs}" ]; then if [ -n "${dirs}" ]; then
header "stripping (with flags $stripFlags) in $dirs" header "stripping (with flags $stripFlags) in $dirs"
for dir in $dirs; do
test -L "$dir" || chmod -R +rw "$dir"
done
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $commonStripFlags $stripFlags || true find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $commonStripFlags $stripFlags || true
stopNest stopNest
fi fi
@ -735,6 +732,9 @@ installPhase() {
fixupPhase() { fixupPhase() {
runHook preFixup runHook preFixup
# Make sure everything is writable so "strip" et al. work.
chmod -R u+w "$prefix"
# Put man/doc/info under $out/share. # Put man/doc/info under $out/share.
forceShare=${forceShare:=man doc info} forceShare=${forceShare:=man doc info}
if [ -n "$forceShare" ]; then if [ -n "$forceShare" ]; then