X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwb-graph;h=24870d09a9f60f3a9009a3fb3dd3bf4d5239b435;hb=7385765ef4c28872df38bfc3dd762ed1dc3b1a3a;hp=1a65dbc1bc4c8dfa5e1306fae2b25461ec4c08f0;hpb=8143c2593c2537b222e3bde7ee2685286c992a87;p=wannabuild.git diff --git a/bin/wb-graph b/bin/wb-graph index 1a65dbc..24870d0 100755 --- a/bin/wb-graph +++ b/bin/wb-graph @@ -5,7 +5,7 @@ use strict; use vars qw($dist); my $previously_built; -$dist = "unstable"; +$dist = "sid"; while( @ARGV && $ARGV[0] =~ /^-/ ) { $_ = shift @ARGV; @@ -19,10 +19,6 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) { else { $dist = shift @ARGV; } - $dist = "stable" if $dist eq "s"; - $dist = "frozen" if $dist eq "f"; - $dist = "unstable" if $dist eq "u"; - die "Bad distribution\n" if !isin($dist, qw(stable testing unstable)); } elsif (/^--$/) { last; @@ -35,21 +31,20 @@ while( @ARGV && $ARGV[0] =~ /^-/ ) { } } -my $date=`date +%m/%d/%Y`; +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); -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( ) { +while( <$pipe> ) { if (/^Database for $dist doesn't exist$/) { last; } @@ -68,7 +63,7 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print ", 0, 0"; } else { @@ -79,7 +74,7 @@ if ($?) { print ", ".$n_state{"Installed"}.", ".$total; } } -} +done print "\n"; exit 0;