]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wb-graph
Update graph tool to use the common place of current arches in unstable.
[wannabuild.git] / bin / wb-graph
index b5dce42ed7e18937437c39416dea149db44e61b4..24870d09a9f60f3a9009a3fb3dd3bf4d5239b435 100755 (executable)
@@ -5,7 +5,7 @@ use strict;
 use vars qw($dist);
 my $previously_built;
 
-$dist = "unstable";
+$dist = "sid";
 
 while( @ARGV && $ARGV[0] =~ /^-/ ) {
        $_ = shift @ARGV;
@@ -19,11 +19,6 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) {
                else {
                        $dist = shift @ARGV;
                }
-               $dist = "oldstable" if $dist eq "o";
-               $dist = "stable"    if $dist eq "s";
-               $dist = "tesing"    if $dist eq "t";
-               $dist = "unstable"  if $dist eq "u";
-               die "Bad distribution\n" if !isin($dist, qw(oldstable stable testing unstable));
        }
        elsif (/^--$/) {
                last;
@@ -40,17 +35,16 @@ my $date=`date -u "+%m/%d/%Y %T"`;
 chop($date);
 print "$date";
 
-my @archs = qw(alpha arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 amd64 sparc armel kfreebsd-amd64 kfreebsd-i386);
-my $arch;
+. /org/wanna-build/triggers/common
 
-foreach $arch (@archs) {
+for arch in $ARCHS_unstable; do
 
 my($lastmsg, %n_state, $total, %n_builder, $pu_total);
 $pu_total = 0;
 $n_state{"Installed"} = 0;
-open( PIPE, "wanna-build --database=$arch/build-db --dist=$dist --list=all 2>&1 |" )
+open( my $pipe, '-|', "wanna-build --database=$arch/build-db --dist=$dist --list=all" )
        or die "Cannot spawn wanna-build: $!\n";
-while( <PIPE> ) {
+while( <$pipe> ) {
        if (/^Database for $dist doesn't exist$/) {
                last;
        }
@@ -69,7 +63,7 @@ while( <PIPE> ) {
        }
        $lastmsg = $_;
 }
-close( PIPE );
+close( $pipe );
 if ($?) {
        print ", 0, 0";
 } else {
@@ -80,7 +74,7 @@ if ($?) {
                print ", ".$n_state{"Installed"}.", ".$total;
        }
 }
-}
+done
 print "\n";
 
 exit 0;