X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwb-graph;h=cd9c5e43ec53f4da2c58b812b7d81cc1ca24a596;hb=c6e2588fcbfabeb1a2c301f152430174647a212d;hp=b5dce42ed7e18937437c39416dea149db44e61b4;hpb=7b09fee8d7503ca518f28e9ba12951848524c652;p=wannabuild.git diff --git a/bin/wb-graph b/bin/wb-graph index b5dce42..cd9c5e4 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,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; @@ -47,10 +42,10 @@ foreach $arch (@archs) { 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 |" ) +$n_state{"Installed"} = 0; +open( my $pipe, '-|', "wanna-build -A $arch --dist=$dist --list=all" ) or die "Cannot spawn wanna-build: $!\n"; -while( ) { +while( <$pipe> ) { if (/^Database for $dist doesn't exist$/) { last; } @@ -69,7 +64,7 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print ", 0, 0"; } else {