3 # This is an absolutely hideous hack.
5 # We scrape a suitable launchpad advanced search to find bugs we've
6 # previously submitted.
8 # We have to run this on chinstrap instead of
9 # cadmium because cadmium (being treated as a buildd from a security
10 # point of view) is not permitted to make external requests other than
14 # For the reasons described below this should be replaced ASAP!
18 # This will break if the list gets too long for LP to display.
20 # Also, there is a problem with Duplicate bugs. See LP #147754. A
21 # tedious workaround is needed for this case. When an autopkgtest
22 # bug, which was marked a duplicate and not the master, is fixed, the
23 # duplicate target will be marked fixed. To work around the LP bug,
24 # it is necessary to adjust the status of the autopkgtest-filed bug:
25 # 1. unduplicate the bug; 2. set it to Fix Released;
26 # 3. duplicate it again.
28 # Occasionally LP seems to burp and give us an empty page.
29 # This means that a cronmail is generated which reports
30 # NO SUPPRESSIONS - PROBABLY WENT WRONG
31 # It is not clear whether the lack of any error message or nonzero
32 # exit status from curl is a bug in curl or LP.
37 url='https://launchpad.net/ubuntu/+bugs?field.searchtext=&orderby=-importance&field.status%3Alist=New&field.status%3Alist=Incomplete&field.status%3Alist=Confirmed&field.status%3Alist=Triaged&field.status%3Alist=In+Progress&field.status%3Alist=Fix+Committed&assignee_option=any&field.assignee=&field.bug_reporter=ian%2Bubuntu-autopkgtest&field.bug_contact=&field.bug_commenter=&field.subscriber=&field.status_upstream-empty-marker=1&field.omit_dupes.used=&field.has_patch.used=&field.tag=&field.has_cve.used=&search=Search'
40 curl -s -S -k -o webpage "$url"
44 print "$1\n" or die $! if
45 m,"https://bugs.launchpad.net/ubuntu/\+source/([-+.0-9a-z]+)/\+bug/\d+",
46 ' <webpage >suppressions.new
48 nl -ba suppressions.new
50 if ! test -s suppressions.new;
52 echo >&2 'NO SUPPRESSIONS - PROBABLY WENT WRONG
60 mv suppressions.new suppressions
61 RSYNC_RSH=ssh rsync suppressions cadmium.buildd:adt-play/.