diff options
author | Erich Eckner <git@eckner.net> | 2018-01-17 21:25:13 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-17 21:25:13 +0100 |
commit | 5fb9f8ad7843e087c974cc1af291b4f494824462 (patch) | |
tree | 73cdc7707602de3714c7a5cc2b6fc51642babbb6 | |
parent | 041139bd471096ddc6be8c8b80c0f5619238dc7a (diff) | |
download | builder-5fb9f8ad7843e087c974cc1af291b4f494824462.tar.xz |
trigger_mirror_refreshs new to signal mirror changes and trigger updates of tier 1 mirrors
-rwxr-xr-x | bin/common-functions | 18 | ||||
-rwxr-xr-x | bin/db-update | 7 | ||||
-rwxr-xr-x | bin/return-assignment | 2 | ||||
-rwxr-xr-x | conf/default.conf | 6 |
4 files changed, 26 insertions, 7 deletions
diff --git a/bin/common-functions b/bin/common-functions index 6bfa319..a972310 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -1303,3 +1303,21 @@ modification_revision_link() { "${mod_rev}" fi } + +# trigger_mirror_refreshs +# trigger a refresh of capable tier 1 mirrors (as backup for master mirror) + +trigger_mirror_refreshs() { + local tmp_file + + tmp_file=$(mktemp) + date '+%s' > \ + "${tmp_file}" + ${master_mirror_rsync_command} \ + "${tmp_file}" \ + "${master_mirror_rsync_directory}/lastupdate" + rm "${tmp_file}" + for trigger_url in ${mirror_refresh_trigger_urls}; do + screen -S trigger-mirror-update -d -m curl -L "${trigger_url}" + done +} diff --git a/bin/db-update b/bin/db-update index 4d4fef1..5f19a28 100755 --- a/bin/db-update +++ b/bin/db-update @@ -324,12 +324,7 @@ move_packages() { "${tmp_dir}/tmp/packages" if ! ${no_action}; then - date '+%s' > \ - "${tmp_dir}/tmp/lastupdate" - # shellcheck disable=SC2086 - ${dummynator} ${master_mirror_rsync_command} \ - "${tmp_dir}/tmp/lastupdate" \ - "${master_mirror_rsync_directory}/lastupdate" + ${dummynator} trigger_mirror_refreshs fi rm -rf --one-file-system "${tmp_dir:?}/tmp" diff --git a/bin/return-assignment b/bin/return-assignment index 5eb9c24..ac430f2 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -324,6 +324,8 @@ ${master_mirror_rsync_command} \ ./*".pkg.tar.xz.sig" \ "${master_mirror_rsync_directory}/i686/${destination}/" +trigger_mirror_refreshs + for package in ${packages}; do remove_old_package_versions 'i686' "${destination}" "${package}" done diff --git a/conf/default.conf b/conf/default.conf index 1d15660..69e15ad 100755 --- a/conf/default.conf +++ b/conf/default.conf @@ -101,9 +101,13 @@ irc_dir='/home/slave/irc/irc.freenode.net' irc_password='top_secret' # commands to run to update the i686 package mirror used for installing i686 packages, -# e.g. the one from /etc/pacman.d/mirrorlist32 +# e.g. the one from /etc/pacman.d/mirrorlist32 (useful on build slaves which do not +# have the master mirror in the mirrorlist32) mirror_update_command='' +# list of urls to trigger updates of the respective mirrors (used on build master only) +mirror_refresh_trigger_urls='' + # possibly pull in custom modifications # shellcheck source=/dev/null |