1
0
Fork 1
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:
Eelco Dolstra 2014-11-05 18:21:44 +01:00
parent 83758d2b26
commit c964077200
6 changed files with 16 additions and 11 deletions

View file

@ -108,7 +108,7 @@ stdenv.mkDerivation (
. ${./functions.sh}
origSrc=$src
src=$(findTarballs $src | head -1)
src=$(findTarball $src)
'';
}
)

View file

@ -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)

View file

@ -32,7 +32,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
postHook = ''
. ${./functions.sh}
propagateImageName
src=$(findTarballs $src | head -1) # Find a tarball.
src=$(findTarball $src)
'';
installExtraDebsPhase = ''

View file

@ -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() {

View file

@ -89,7 +89,7 @@ stdenv.mkDerivation (
postHook = ''
. ${./functions.sh}
origSrc=$src
src=$(findTarballs $src | head -1)
src=$(findTarball $src)
'';
preHook = ''

View file

@ -16,7 +16,7 @@ vmTools.buildRPM (
preBuild = ''
. ${./functions.sh}
propagateImageName
src=$(findTarballs $src | head -1) # Pick the first tarball.
src=$(findTarball $src)
'';
postInstall = ''