X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1ccb1dbb6a3d342a647e2f5ab8d0f3d99d048a6b..d72f1d79c0a53056a7cecad6c65fd57a183059b0:/build/run-library.sh diff --git a/build/run-library.sh b/build/run-library.sh index 267b641f62..a13470bc43 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -199,11 +199,16 @@ test_package_presence() { deb_architecture="amd64" if [[ "$pkgtype" =~ ^(python|python3)$ ]]; then - rpm_architecture="all" + rpm_architecture="noarch" deb_architecture="all" fi - # These packages have binary components + if [[ "$pkgtype" =~ ^(src)$ ]]; then + rpm_architecture="noarch" + deb_architecture="all" + fi + + # These python packages have binary components if [[ "$pkgname" =~ (ruamel|ciso|pycrypto|pyyaml) ]]; then rpm_architecture="x86_64" deb_architecture="amd64" @@ -437,6 +442,11 @@ fpm_build () { FPM_EXIT_CODE=$? fpm_verify $FPM_EXIT_CODE $FPM_RESULTS + + # if something went wrong and debug is off, print out the fpm command that errored + if [[ 0 -ne $? ]] && [[ "$STDOUT_IF_DEBUG" == "/dev/null" ]]; then + echo -e "\n${COMMAND_ARR[@]}\n" + fi } # verify build results @@ -452,14 +462,19 @@ fpm_verify () { if [[ "$FPM_PACKAGE_NAME" == "" ]]; then EXITCODE=1 + echo echo "Error: $PACKAGE: Unable to figure out package name from fpm results:" echo echo $FPM_RESULTS echo + return 1 elif [[ "$FPM_RESULTS" =~ "File already exists" ]]; then echo "Package $FPM_PACKAGE_NAME exists, not rebuilding" + return 0 elif [[ 0 -ne "$FPM_EXIT_CODE" ]]; then + EXITCODE=1 echo "Error building package for $1:\n $FPM_RESULTS" + return 1 fi }