diff options
author | Erich Eckner <git@eckner.net> | 2018-10-04 10:02:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-04 10:02:57 +0200 |
commit | 16d5f7b71d5c90a6966c95e4b7a078c8b01b820a (patch) | |
tree | 7680ca21ec809005c0fc3d50d85b87cced098c39 /bin/seed-build-list | |
parent | dde18ad103e2522759cc2f15fc42dc23987b2b2f (diff) | |
download | builder-16d5f7b71d5c90a6966c95e4b7a078c8b01b820a.tar.xz |
bin/seed-build-list: -f|--force new to ignore (some) errors
Diffstat (limited to 'bin/seed-build-list')
-rwxr-xr-x | bin/seed-build-list | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list index b79be3e..03cc611 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -7,9 +7,6 @@ # TODO: allow to filter by architecture -# TODO: doesn't find packages if they were moved between community64 and -# packages64 - # shellcheck disable=SC2016 usage() { >&2 echo '' @@ -22,6 +19,8 @@ usage() { >&2 echo ' dependencies that are not available from any real' >&2 echo ' repository and which cannot be replaced by another,' >&2 echo ' less stable version of the same package.' + >&2 echo ' -f|--force' + >&2 echo ' Do not exit if mysql_generate_package_metadata() failed.' >&2 echo ' -h|--help:' >&2 echo ' Show this help and exit.' >&2 echo ' -i|--ignore $pkgbase:' @@ -49,8 +48,9 @@ tmp_dir=$(mktemp -d 'tmp.seed-build-list.XXXXXXXXXX' --tmpdir) trap "rm -rf --one-file-system '${tmp_dir:?}'" EXIT eval set -- "$( - getopt -o ahi:m:np:u:w \ + getopt -o afhi:m:np:u:w \ --long auto \ + --long force \ --long help \ --long ignore: \ --long mirror: \ @@ -65,6 +65,7 @@ eval set -- "$( auto=false update=true wait_for_lock='-n' +ignore_mysql_generate_package_metadata_errors=false if [ -r "${base_dir}/conf/seed-ignore-packages" ]; then sed 's/^/2\t/' "${base_dir}/conf/seed-ignore-packages" >> \ @@ -77,6 +78,9 @@ do -a|--auto) auto=true ;; + -f|--force) + ignore_mysql_generate_package_metadata_errors=true + ;; -h|--help) usage 0 ;; @@ -556,7 +560,10 @@ if ${update}; then while read -r pkgbase git_rev mod_git_rev repo; do printf '%s ' "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}" | \ sed 's/ $/\n/' - mysql_generate_package_metadata "${repository_ids__any_build_list}" "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}" + if ! mysql_generate_package_metadata "${repository_ids__any_build_list}" "${pkgbase}" "${git_rev}" "${mod_git_rev}" "${repo}" && \ + ! ${ignore_mysql_generate_package_metadata_errors}; then + exit 2 + fi done < \ "${tmp_dir}/update-list" |