summaryrefslogtreecommitdiff
path: root/bin/check-upstream-bug-tracker
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check-upstream-bug-tracker')
-rwxr-xr-xbin/check-upstream-bug-tracker24
1 files changed, 22 insertions, 2 deletions
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