Browse Source

bin/build-packages: clean up haskell-* logic of :without_check: straw

Erich Eckner 3 months ago
parent
commit
944ee949d4
1 changed files with 12 additions and 9 deletions
  1. 12
    9
      bin/build-packages

+ 12
- 9
bin/build-packages View File

@@ -67,6 +67,8 @@ usage() {
67 67
   >&2 echo 'known straws (separated by and enclosed in ":", sets of straws separated by " "):'
68 68
   >&2 echo '  :clean_chroot:'
69 69
   >&2 echo '    clean the chroot before building'
70
+  >&2 echo '  :haskell_without_check:'
71
+  >&2 echo '    try with :without_check: iff this is a haskell-*, python-* or python2-* package'
70 72
   >&2 echo '  :mirrored_source:'
71 73
   >&2 echo '    compile from source tarbal from sources.archlinux.org if possible'
72 74
   >&2 echo '  :mirrored_source_by_hash:'
@@ -299,14 +301,6 @@ while [ "${count}" -ne 0 ] && \
299 301
         exit 2
300 302
       fi
301 303
 
302
-      if [ -z "${forced_straws}" ] && \
303
-        printf '%s\n' "${package}" | \
304
-          grep -q '^\(haskell\|python2\?\)-'; then
305
-        haskell_straws=':without_check:'
306
-      else
307
-        haskell_straws=''
308
-      fi
309
-
310 304
       if [ "${git_revision##*-}" = 'HEAD' ]; then
311 305
         git_revision=$(
312 306
           repo_name="${git_revision%-*}"
@@ -410,12 +404,21 @@ while [ "${count}" -ne 0 ] && \
410 404
         "${base_dir}/bin/ping-to-master" "$$" "${tmp_dir}" &
411 405
       fi
412 406
       success=false
413
-      for straw in ${straws_that_might_repair_failing_builds} ${haskell_straws}; do
407
+      for straw in ${straws_that_might_repair_failing_builds}; do
414 408
 
415 409
         if ${success}; then
416 410
           break
417 411
         fi
418 412
 
413
+        if echo "${straw}" | \
414
+          grep -qF ':haskell_without_check:'; then
415
+          if ! printf '%s\n' "${package}" | \
416
+            grep -q '^\(haskell\|python2\?\)-'; then
417
+            continue
418
+          fi
419
+          straw="${straw}:without_check:"
420
+        fi
421
+
419 422
         echo 'preparing' > "${tmp_dir}/.ping-build-master"
420 423
 
421 424
         outerParameters="-r ${archbuild_chroots}"