From 8498811f21bad0972db735d633ea4bf15af36418 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 17 Aug 2023 18:27:12 -0400 Subject: [PATCH] 20878: Improve RPM download logic Instead of downloading and parsing a package file listing, just try to download the package directly, and check whether that succeeds. Arvados-DCO-1.1-Signed-off-by: Brett Smith --- build/run-library.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/build/run-library.sh b/build/run-library.sh index 57fa49cf74..6d5d0b6535 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -463,13 +463,10 @@ 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 echo "Package $full_pkgname exists, not rebuilding!" -- 2.39.5