Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:51:33 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-05-22 16:51:33 +0200
commit0ff9504bc1b04f80c63fa8607063e6118eeb63a4 (patch)
treed51849d5fbe6a392580aa88438f3aa1f3f8c8508 /bin
parentdf6e78794309c047bb020636d373d8cca183d009 (diff)
bin/get-package-updates --max-upstream-packages new
* allows to hackily update only a subset of all modified packages
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-package-updates22
1 files changed, 20 insertions, 2 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index d791453..ae3c018 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -22,6 +22,9 @@ usage() {
>&2 echo ' -h|--help: Show this help and exit.'
>&2 echo ' -i|--ignore-insanity:'
>&2 echo ' Do not abort when insane.'
+ >&2 echo ' -m|--max-upstream-packages $number:'
+ >&2 echo ' Do not update more than $number upstream packages.'
+ >&2 echo ' Do not update git head of state repository.'
>&2 echo ' -n|--no-pull: Do not pull git repos, merely reorder build list.'
>&2 echo ' Conflicts -d.'
>&2 echo ' -r|--recent-modifications:'
@@ -33,10 +36,11 @@ usage() {
}
eval set -- "$(
- getopt -o d:hinrw \
+ getopt -o d:him:nrw \
--long date: \
--long help \
--long ignore-insanity \
+ --long max-upstream-packages: \
--long no-pull \
--long recent-modifications \
--long wait \
@@ -47,6 +51,7 @@ eval set -- "$(
block_flag='-n'
date_time=''
ignore_insanity=false
+max_upstream_packages=''
pull=true
recent_modifications=false
@@ -63,6 +68,10 @@ do
-i|--ignore-insanity)
ignore_insanity=true
;;
+ -m|--max-upstream-packages)
+ shift
+ max_upstream_packages="$1"
+ ;;
-n|--no-pull)
pull=false
;;
@@ -355,7 +364,12 @@ echo 'Check modified packages from the last update, and put them to the build li
mod_git_revision='0000000000000000000000000000000000000000'
fi
printf '%s %s %s %s\n' "${pkgbase}" "${repository}" "${git_revision}" "${mod_git_revision}"
- done
+ done \
+ | if [ -n "${max_upstream_packages}" ]; then
+ head -n"${max_upstream_packages}"
+ else
+ cat
+ fi
# shellcheck disable=SC2154
git -C "${repo_paths__archlinux32}" diff "${old_repo_revisions__archlinux32}" "${new_repo_revisions__archlinux32}" --name-status \
| tr '\t/' ' ' \
@@ -508,6 +522,10 @@ echo 'Done - mark decisions as final.'
# update hashes of repositories in mysql database
for repo in ${repo_names}; do
+ if [ -n "${max_upstream_packages}" ] \
+ && [ "${repo}" = 'state' ]; then
+ continue
+ fi
printf 'UPDATE `git_repositories`'
printf ' SET `git_repositories`.`head`=from_base64("%s")' \
"$(eval 'printf '"'"'%s'"'"' "${new_repo_revisions__'"${repo}"'}"' | base64 -w0)"