Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check-bugtracker
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-07 09:54:13 +0100
committerErich Eckner <git@eckner.net>2017-11-07 09:54:13 +0100
commitf98072f6d086d128071047d4a4ad5db560686c12 (patch)
treeea3a735fef4f9e2d6ddeb9b8bb858ee4336e7ada /bin/check-bugtracker
parent4fad91a1af6707aaf1dad619ac4e648b45404c2b (diff)
check-bugtracker new: remove "tested" flag from faulty packages
Diffstat (limited to 'bin/check-bugtracker')
-rwxr-xr-xbin/check-bugtracker34
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/check-bugtracker b/bin/check-bugtracker
new file mode 100755
index 0000000..f01bc8e
--- /dev/null
+++ b/bin/check-bugtracker
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# check the bug tracker for packages in testing and community-testing
+# with issues and mark these packages as "testing" if they are currently
+# marked as "tested"
+
+# shellcheck disable=SC2039
+# shellcheck source=conf/default.conf
+. "${0%/*}/../conf/default.conf"
+
+tmp_dir=$(mktemp -d)
+trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
+
+receive_buglist | \
+ grep '<\(community-\)\?testing>' | \
+ tr ' ,;' '\n' | \
+ sed -n '
+ s/^\[//
+ T
+ s/]$//
+ T
+ p
+ ' | \
+ sort -u > \
+ "${tmp_dir}/faulty-packages"
+
+find "${work_dir}/package-states" -name '*.tested' -printf '%f\n' | \
+ sed '
+ s|\.[^.]\+$||
+ s|^\(.*\)\(\.[^.]\+\)\{3\}$|\1 \0|
+ ' | \
+ sort -k1,1 | \
+ join -1 1 -2 1 -o 1.2 - "${tmp_dir}/faulty-packages" | \
+ "${base_dir}/bin/modify-package-state" -n --faulty /dev/stdin