X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9c58422ecfd63291972fae7a00e3a4f683c2d1b4..2cf2121b848c11f5753c54d89415dae67a6f037d:/build/run-library.sh diff --git a/build/run-library.sh b/build/run-library.sh index 57fa49cf74..12fb34f65f 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -463,15 +463,12 @@ test_package_presence() { return 0 ;; esac - local centos_repo="http://rpm.arvados.org/$rpm_root/$arch/" + local rpm_url="http://rpm.arvados.org/$rpm_root/$arch/$full_pkgname" - repo_pkg_list=$(curl -s -o - ${centos_repo}) - echo ${repo_pkg_list} |grep -q ${full_pkgname} - if [ $? -eq 0 ]; then + if curl -fs -o "$WORKSPACE/packages/$TARGET/$full_pkgname" "$rpm_url"; then echo "Package $full_pkgname exists upstream, not rebuilding, downloading instead!" - curl -s -o "$WORKSPACE/packages/$TARGET/${full_pkgname}" ${centos_repo}${full_pkgname} return 1 - elif test -f "$WORKSPACE/packages/$TARGET/processed/${full_pkgname}" ; then + elif [[ -f "$WORKSPACE/packages/$TARGET/processed/$full_pkgname" ]]; then echo "Package $full_pkgname exists, not rebuilding!" return 1 else