From: Ian Jackson Date: Thu, 25 Oct 2007 17:37:39 +0000 (+0100) Subject: more wip suppression stuff for magrathea X-Git-Tag: converted-from-bzr~22 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fb0b14ba2402474dc8a4ddd95df517f432e89635;p=autopkgtest.git more wip suppression stuff for magrathea --- diff --git a/.bzrignore b/.bzrignore index 27bfd3f..a734e2e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -8,4 +8,8 @@ xen/sed-readconfig xen/readconfig hosts/chinstrap/webpage hosts/chinstrap/suppressions +hosts/chinstrap/suppressions-lock hosts/chinstrap/suppressions.new +hosts/magrathea/suppressions +hosts/magrathea/suppressions-lock +hosts/magrathea/suppressions.new diff --git a/hosts/chinstrap/update-suppressions b/hosts/chinstrap/update-suppressions index d5f260e..a0b3afb 100755 --- a/hosts/chinstrap/update-suppressions +++ b/hosts/chinstrap/update-suppressions @@ -31,6 +31,10 @@ # It is not clear whether the lack of any error message or nonzero # exit status from curl is a bug in curl or LP. +# Furthermore, much of this functionality is now in +# adt-suppressions-update and the LP part should be in a script called +# adt-suppressions-fetch-launchpad. + cd ${0%/*} diff --git a/hosts/magrathea/get-suppressions.pl b/runner/adt-suppressions-fetch-debbugs similarity index 83% rename from hosts/magrathea/get-suppressions.pl rename to runner/adt-suppressions-fetch-debbugs index 2d79992..697ddde 100755 --- a/hosts/magrathea/get-suppressions.pl +++ b/runner/adt-suppressions-fetch-debbugs @@ -5,22 +5,21 @@ use strict; use Data::Dumper; use SOAP::Lite; -@ARGV==1 or die; -my ($dist) = @ARGV; +die if @ARGV; sub e ($) { my ($v) = @_; - $v= 'suppressions_'.$v; + $v= ''.$v; my $r= $ENV{$v}; die "need $v in environment" unless defined $r; return $r; } -my $debbugs_soap= e('debbugs_soap'); -my $debbugs_uri= e('debbugs_uri'); - -my $usertag_owner= e('usertag_owner') -my $usertag_name= e('usertag_name') +my $dist= e('distro'); +my $debbugs_soap= e('suppressions_debbugs_soap'); +my $debbugs_uri= e('suppressions_debbugs_uri'); +my $usertag_owner= e('suppressions_usertag_owner'); +my $usertag_name= e('suppressions_usertag_name'); my $soap= SOAP::Lite->uri($debbugs_soap)->proxy($debbugs_uri); diff --git a/hosts/magrathea/update-suppressions b/runner/adt-suppressions-update old mode 100644 new mode 100755 similarity index 83% rename from hosts/magrathea/update-suppressions rename to runner/adt-suppressions-update index 0b3aa4f..e46f45c --- a/hosts/magrathea/update-suppressions +++ b/runner/adt-suppressions-update @@ -17,10 +17,10 @@ cd "$1" shift . "$1" -: "${suppressions_file_to_fetch:=$suppresspackages}" +: "${suppressions_file_to_fetch:=${suppresspackages:-suppressions}}" export suppressions_file_to_fetch -: "${suppressions_lockfile:=$suppressions_file_to_fetch-lock}" +: "${suppressions_file_to_lock:=$suppressions_file_to_fetch-lock}" echo 'locking' @@ -29,6 +29,8 @@ with-lock-ex -f "$suppressions_file_to_lock" bash -c ' f="$suppressions_file_to_fetch" + export distro + echo fetching ${suppressions_fetch:-adt-suppressions-fetch-$suppressions_kind} \ >"$f".new @@ -38,7 +40,7 @@ with-lock-ex -f "$suppressions_file_to_lock" bash -c ' if ! test -s "$f".new; then - echo >&2 'NO SUPPRESSIONS - PROBABLY WENT WRONG + echo >&2 "NO SUPPRESSIONS - PROBABLY WENT WRONG" exit 1 fi