From ceab9cd198f4b9c72df62b05db49c1ad9b98dea2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 12 Apr 2019 11:57:21 +0200 Subject: bin/get-package-updates: add option -r to use recent modifications commit even though -d is active --- bin/get-package-updates | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/get-package-updates b/bin/get-package-updates index 94bf8bc..1248fec 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -35,6 +35,10 @@ usage() { >&2 echo ' Do not abort when insane.' >&2 echo ' -n|--no-pull: Do not pull git repos, merely reorder build list.' >&2 echo ' Conflicts -d.' + >&2 echo ' -r|--recent-modifications:' + >&2 echo ' Use the latest commit for the modifications' + >&2 echo ' git repository (e.g. ignore -d for it).' + >&2 echo ' Requires -d.' >&2 echo ' -w|--wait: If necessary, wait for lock blocking.' >&2 echo ' -x|--test-exclusion $package:' >&2 echo ' Print additionally deleted/excluded packages if' @@ -43,11 +47,12 @@ usage() { } eval set -- "$( - getopt -o d:hinwx: \ + getopt -o d:hinrwx: \ --long date: \ --long help \ --long ignore-insanity \ --long no-pull \ + --long recent-modifications \ --long test-exclusion: \ --long wait \ -n "$(basename "$0")" -- "$@" || \ @@ -58,6 +63,7 @@ block_flag='-n' date_time='' ignore_insanity=false pull=true +recent_modifications=false test_exclusion='' while true @@ -76,6 +82,9 @@ do -n|--no-pull) pull=false ;; + -r|--recent-modifications) + recent_modifications=true + ;; -w|--wait) block_flag='' ;; @@ -110,6 +119,11 @@ if [ -n "${date_time}" ] && ! ${pull}; then usage fi +if ${recent_modifications} && [ -z "${date_time}" ]; then + >&2 printf -- '-r requires -d.\n' + usage +fi + if [ -s "${work_dir}/build-master-sanity" ]; then >&2 echo 'Build master is not sane.' if ! ${ignore_insanity}; then @@ -221,7 +235,9 @@ for repo in ${repo_names}; do )'" # determine new git revision if ${pull}; then - if [ -z "${date_time}" ]; then + if ${recent_modifications} && \ + [ "${repo}" = 'archlinux32' ] || \ + [ -z "${date_time}" ]; then eval "new_repo_revisions__${repo}='$( git -C "${repo_path}" rev-parse HEAD )'" -- cgit v1.2.3-70-g09d2