From b06968ce11c6afe27fe949fef864ea41ff95579d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 7 Nov 2017 09:27:50 +0100 Subject: bin/common-functions, bin/modify-package-state: check bugtracker if package has issue before marking as "tested" --- bin/common-functions | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'bin/common-functions') diff --git a/bin/common-functions b/bin/common-functions index 81d4e8f..bf88b8f 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -608,7 +608,9 @@ wait_some_time() { str_to_regex() { echo "$1" | \ - sed 's|\.|\\.|g' + sed ' + s|[.[]|\\\0|g + ' } # make_source_info $package $repository $git_revision $mod_git_revision $output @@ -1174,3 +1176,27 @@ print_list_of_archaic_packages() { done | \ sort -u } + +# receive_buglist +# receive the buglist from bugs.archlinux32.org and print it to stdout + +receive_buglist() { + curl -Ss 'http://bugs.archlinux32.org/index.php?export_list=Export%20Tasklist' | \ + sed ' + 1 d + /^[^,]\+,Packages,/ ! d + s/^\([^,]\+,\)\{3\}// + 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>" +} -- cgit v1.2.3-54-g00ecf