chiark / gitweb /
more wip suppression stuff for magrathea
authorIan Jackson <ian@davenant.greenend.org.uk>
Thu, 25 Oct 2007 17:37:39 +0000 (18:37 +0100)
committerIan Jackson <ian@davenant.greenend.org.uk>
Thu, 25 Oct 2007 17:37:39 +0000 (18:37 +0100)
.bzrignore
hosts/chinstrap/update-suppressions
runner/adt-suppressions-fetch-debbugs [moved from hosts/magrathea/get-suppressions.pl with 83% similarity]
runner/adt-suppressions-update [moved from hosts/magrathea/update-suppressions with 83% similarity, mode: 0755]

index 27bfd3fdd8dd23cc6f00e97f2ca832d61790d163..a734e2e208c0ff690ecee08361b0b9a5ede1e34e 100644 (file)
@@ -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
index d5f260e3ead832f690a5f57bfad50780c016e8bd..a0b3afba2b5944d1ce14c6b1da75d0ee9453e472 100755 (executable)
 # 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%/*}
 
similarity index 83%
rename from hosts/magrathea/get-suppressions.pl
rename to runner/adt-suppressions-fetch-debbugs
index 2d79992bd9a44c284f74849c4e13005e416f7964..697ddde0497bd899452ba3ed0365bbe129f120b3 100755 (executable)
@@ -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);
 
old mode 100644 (file)
new mode 100755 (executable)
similarity index 83%
rename from hosts/magrathea/update-suppressions
rename to runner/adt-suppressions-update
index 0b3aa4f..e46f45c
@@ -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