diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-bugtracker | 3 | ||||
-rwxr-xr-x | bin/common-functions | 21 | ||||
-rwxr-xr-x | bin/modify-package-state | 4 |
3 files changed, 10 insertions, 18 deletions
diff --git a/bin/check-bugtracker b/bin/check-bugtracker index f01bc8e..8fe81d9 100755 --- a/bin/check-bugtracker +++ b/bin/check-bugtracker @@ -11,8 +11,7 @@ tmp_dir=$(mktemp -d) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT -receive_buglist | \ - grep '<\(community-\)\?testing>' | \ +receive_buglist 'Testing' | \ tr ' ,;' '\n' | \ sed -n ' s/^\[// diff --git a/bin/common-functions b/bin/common-functions index c233003..3af96dd 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -1177,26 +1177,19 @@ print_list_of_archaic_packages() { sort -u } -# receive_buglist -# receive the buglist from bugs.archlinux32.org and print it to stdout +# receive_buglist $category +# receive the buglist from bugs.archlinux32.org for $category (e.g. 'Testing') +# and print it to stdout receive_buglist() { + local category + category="$1" curl -Ss 'http://bugs.archlinux32.org/index.php?export_list=Export%20Tasklist' | \ sed ' 1 d - /^[^,]\+,Packages,/ ! d + /^[^,]\+,"Packages: '"${category}"'",/ ! d s/^\([^,]\+,\)\{3\}// - s/^"[^"]\+","// + s/^\("[^"]\+"\|[^"][^,]*\),"// s/".*$// ' } - -# package_has_bug ${package} -# check if there is an open bug report on ${package} in testing or community-testing -# the bug list is read from stdin - -package_has_bug() { - local package - package="$1" - grep -q "$(str_to_regex "[${package}]").*<\(community-\)\?testing>" -} diff --git a/bin/modify-package-state b/bin/modify-package-state index 6ccec6a..4798754 100755 --- a/bin/modify-package-state +++ b/bin/modify-package-state @@ -134,7 +134,7 @@ if ! flock -s -n 9; then fi if [ "${action}" = 'tested' ]; then - receive_buglist > \ + receive_buglist 'Testing' > \ "${tmp_dir}/package-bug-titles" fi @@ -186,7 +186,7 @@ fi ;; 'tested') if [ -f "${work_dir}/package-states/${package}.testing" ] && \ - ! package_has_bug "${package}" < "${tmp_dir}/package-bug-titles"; then + ! grep -qF "[${package}]" "${tmp_dir}/package-bug-titles"; then mv \ "${work_dir}/package-states/${package}.testing" \ "${work_dir}/package-states/${package}.tested" |