mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
findTarball: Handle pipefail
It was failing because the bash subshell died with SIGPIPE, which is no longer ignored. http://hydra.nixos.org/build/16766452
This commit is contained in:
parent
83758d2b26
commit
c964077200
|
@ -108,7 +108,7 @@ stdenv.mkDerivation (
|
|||
. ${./functions.sh}
|
||||
|
||||
origSrc=$src
|
||||
src=$(findTarballs $src | head -1)
|
||||
src=$(findTarball $src)
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -38,7 +38,7 @@ stdenv.mkDerivation (
|
|||
. ${./functions.sh}
|
||||
|
||||
origSrc=$src
|
||||
src=$(findTarballs $src | head -1)
|
||||
src=$(findTarball $src)
|
||||
|
||||
if test -e $origSrc/nix-support/hydra-release-name; then
|
||||
releaseName=$(cat $origSrc/nix-support/hydra-release-name)
|
||||
|
|
|
@ -32,7 +32,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
|
|||
postHook = ''
|
||||
. ${./functions.sh}
|
||||
propagateImageName
|
||||
src=$(findTarballs $src | head -1) # Find a tarball.
|
||||
src=$(findTarball $src)
|
||||
'';
|
||||
|
||||
installExtraDebsPhase = ''
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
findTarballs() {
|
||||
findTarball() {
|
||||
local suffix i
|
||||
test -d "$1/tarballs/" && {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$1"
|
||||
return
|
||||
fi
|
||||
if [ -d "$1/tarballs/" ]; then
|
||||
for suffix in tar.gz tgz tar.bz2 tbz2 tar.xz tar.lzma; do
|
||||
for i in $1/tarballs/*.$suffix; do echo $i; done
|
||||
done | sort
|
||||
}
|
||||
echo "$1"
|
||||
for i in $1/tarballs/*.$suffix; do echo $i; return; done
|
||||
done | sort | head -1
|
||||
return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
canonicalizeJarManifest() {
|
||||
|
|
|
@ -89,7 +89,7 @@ stdenv.mkDerivation (
|
|||
postHook = ''
|
||||
. ${./functions.sh}
|
||||
origSrc=$src
|
||||
src=$(findTarballs $src | head -1)
|
||||
src=$(findTarball $src)
|
||||
'';
|
||||
|
||||
preHook = ''
|
||||
|
|
|
@ -16,7 +16,7 @@ vmTools.buildRPM (
|
|||
preBuild = ''
|
||||
. ${./functions.sh}
|
||||
propagateImageName
|
||||
src=$(findTarballs $src | head -1) # Pick the first tarball.
|
||||
src=$(findTarball $src)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
|
Loading…
Reference in a new issue