From 795dd0db9848020c4d60b4f3eaaf9c2d7b82e4a8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 23 Oct 2018 08:14:54 +0200 Subject: bin/check-upstream-bug-tracker: -a|--architecture new --- bin/check-upstream-bug-tracker | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'bin/check-upstream-bug-tracker') diff --git a/bin/check-upstream-bug-tracker b/bin/check-upstream-bug-tracker index a8d3476..95b6239 100755 --- a/bin/check-upstream-bug-tracker +++ b/bin/check-upstream-bug-tracker @@ -10,24 +10,36 @@ usage() { >&2 echo 'for open bugs on packages that fail to build' >&2 echo '' >&2 echo 'possible options:' - >&2 echo ' -h|--help: Show this help and exit.' + >&2 echo ' -a|--architecture $arch:' + >&2 echo ' only check packages which fail on $arch' >&2 echo ' -f|--failure $identifier:' >&2 echo ' only check packages which fail due to $identifier' + >&2 echo ' -h|--help: Show this help and exit.' [ -z "$1" ] && exit 1 || exit "$1" } eval set -- "$( - getopt -o f:h \ + getopt -o a:f:h \ + --long architecture: \ --long failure: \ --long help \ -n "$(basename "$0")" -- "$@" || \ echo usage )" +architecture='' identifier='' while true do case "$1" in + -a|--architecture) + shift + if [ -n "${architecture}" ]; then + >&2 echo 'Option -a only allowed once.' + usage + fi + architecture="$1" + ;; -f|--failure) shift if [ -n "${identifier}" ]; then @@ -72,6 +84,14 @@ trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT printf ' FROM `package_sources`' mysql_join_package_sources_upstream_repositories mysql_join_package_sources_build_assignments + if [ -n "${architecture}" ]; then + mysql_join_build_assignments_architectures + printf ' AND `architectures`.`name`=from_base64("%s")' \ + "$( + printf '%s' "${architecture}" | \ + base64 -w0 + )" + fi if [ -n "${identifier}" ]; then mysql_join_build_assignments_failed_builds mysql_join_failed_builds_fail_reasons -- cgit v1.2.3