]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
sync-pull: in the 'ugly loop', skip nonexistent repos 2413/head
authorDan Mick <dan.mick@redhat.com>
Mon, 28 Jul 2025 22:14:37 +0000 (15:14 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 28 Jul 2025 22:14:37 +0000 (15:14 -0700)
This heuristic remains questionable, but continue it on
by allowing some named distro/version repos to not exist without
stopping sync-pull from working

Signed-off-by: Dan Mick <dan.mick@redhat.com>
scripts/sync-pull

index bc5d12690eadec43772d43d307cc7748ad57c59a..8eb1a3740fd00c333a81629bac823221706fe449 100755 (executable)
@@ -17,7 +17,11 @@ if [[ "$project" == "ceph" ]] ; then
   # This ugly loop checks all possible DEB combinations to see which repo has the most packages since that's likely the repo you want to sync.
   current_highest_count=0
   for combo in debian/bookworm debian/bullseye ubuntu/bionic ubuntu/focal ubuntu/jammy ubuntu/noble; do
-    combo_count=$(curl -fs https://chacra.ceph.com/r/$project/$release/$sha1/${combo}/flavors/default/pool/main/c/ceph/ | wc -l)
+    combo_count=$(curl -fs https://chacra.ceph.com/r/$project/$release/$sha1/${combo}/flavors/default/pool/main/c/ceph/ | wc -l || /bin/true)
+    if [[ ${PIPESTATUS[0]} -eq 22 ]] ; then
+      echo "$combo packages not found, skipping"
+      continue
+    if
     if [ $combo_count -gt $current_highest_count ]; then
       current_highest_count=$combo_count
       highest_combo=$combo