blob: 46e78db25eb66c8e6f8a8caa60c860a4288d7f36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/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 'tmp.check-bugtracker.XXXXXXXXXX' --tmpdir)
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
receive_buglist '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
|