summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-12 11:57:21 +0200
committerErich Eckner <git@eckner.net>2019-04-12 11:57:21 +0200
commitceab9cd198f4b9c72df62b05db49c1ad9b98dea2 (patch)
tree868da84f63bd99814b67f937d7db7b27c12cf514 /bin/get-package-updates
parent667a91842bf34f5a17c5dee8ff755fae2bfe9b16 (diff)
downloadbuilder-ceab9cd198f4b9c72df62b05db49c1ad9b98dea2.tar.xz
bin/get-package-updates: add option -r to use recent modifications commit even though -d is active
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates20
1 files changed, 18 insertions, 2 deletions
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
)'"