index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-02-20 15:43:05 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-20 15:43:05 +0100 |
commit | 28ad985db23c849db7692580963eee85545fbf60 (patch) | |
tree | 79e5aef1a1a13f07e91b6fc388f35b4320375e7e /bin | |
parent | cff358619ed62e8b458540e052c879c12ed4fd22 (diff) |
-rwxr-xr-x | bin/seed-build-list | 33 |
diff --git a/bin/seed-build-list b/bin/seed-build-list index 1d01545..219e45a 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -54,6 +54,8 @@ usage() { >&2 echo ' -p|--package $pkg_regex:' >&2 echo ' Reschedule packages with matching pkgname or pkgbase.' >&2 echo ' Note, that these packages must be known to the database.' + >&2 echo ' -s|--skip-arch $arch:' + >&2 echo ' Ignore packages, that are outdated on $arch only (-m).' >&2 echo ' -w|--wait:' >&2 echo ' Wait for lock if necessary.' [ -z "$1" ] && exit 1 || exit "$1" @@ -64,7 +66,7 @@ tmp_dir=$(mktemp -d 'tmp.seed-build-list.XXXXXXXXXX' --tmpdir) trap "rm -rf --one-file-system '${tmp_dir:?}'" EXIT eval set -- "$( - getopt -o afhi:jm:np:w \ + getopt -o afhi:jm:np:s:w \ --long auto \ --long force \ --long help \ @@ -73,6 +75,7 @@ eval set -- "$( --long mirror: \ --long no-action \ --long package: \ + --long skip-arch: \ --long wait \ -n "$(basename "$0")" -- "$@" || \ echo usage @@ -122,6 +125,11 @@ do printf '%s\n' "$1" >> \ "${tmp_dir}/package-regexes" ;; + -s|--skip-arch) + shift + printf '%s\n' "$1" >> \ + "${tmp_dir}/skip-archs" + ;; -w|--wait) wait_for_lock='' ;; @@ -151,6 +159,13 @@ if [ ! -s "${tmp_dir}/mirrors" ] && \ exit 0 fi +if [ -s "${tmp_dir}/skip-archs" ] && \ + [ ! -s "${tmp_dir}/mirrors" ]; then + >&2 echo 'Invalid combination of options: -s|--skip-archs requires -m|--mirror.' + usage 2 + exit 2 +fi + # get locks if ${update}; then exec 9> "${sanity_check_lock_file}" @@ -209,6 +224,7 @@ done # harvest pkgnames from mirror delta if [ -s "${tmp_dir}/mirrors" ]; then + echo 'any' >> "${tmp_dir}/skip-archs" { # theirs while read -r mirror; do @@ -223,7 +239,20 @@ if [ -s "${tmp_dir}/mirrors" ]; then N s/^.*\n// /^lib32-/d - s/^\(.*-\)x86_64\.pkg\.tar\.\(xz\|zst\)$/\1i486\n\1i686\n\1pentium4/ + s/^\(.*-\)x86_64\.pkg\.tar\.\(xz\|zst\)$/'"$( + # shellcheck disable=SC2086,SC2154 + printf '%s\n' ${architectures} \ + | grep -vxFf "${tmp_dir}/skip-archs" \ + | sed ' + s/^.*$/\\1\0/ + ' \ + | sed ' + :a + $! N + $! ba + s/\n/\\n/g + ' + )"'/ s/^\(.*-any\)\.pkg\.tar\.\(xz\|zst\)$/\1/ ' | \ sed ' |