Merge pull request #297074 from lolbinarycat/tarfix
stdenv: pass --mode=+w to tar, ensuring extraction is possible
This commit is contained in:
commit
36cd37b5dc
|
@ -1069,12 +1069,12 @@ _defaultUnpack() {
|
||||||
# disregard the error code from the xz invocation. Otherwise,
|
# disregard the error code from the xz invocation. Otherwise,
|
||||||
# it can happen that tar exits earlier, causing xz to fail
|
# it can happen that tar exits earlier, causing xz to fail
|
||||||
# from a SIGPIPE.
|
# from a SIGPIPE.
|
||||||
(XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; true) | tar xf - --warning=no-timestamp
|
(XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; true) | tar xf - --mode=+w --warning=no-timestamp
|
||||||
;;
|
;;
|
||||||
*.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
|
*.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
|
||||||
# GNU tar can automatically select the decompression method
|
# GNU tar can automatically select the decompression method
|
||||||
# (info "(tar) gzip").
|
# (info "(tar) gzip").
|
||||||
tar xf "$fn" --warning=no-timestamp
|
tar xf "$fn" --mode=+w --warning=no-timestamp
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user