X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=blobdiff_plain;f=bin%2Fwb-graph;h=743c1af29a76a7885fe3d9e065f91bdd2a021b0b;hp=941938031ddc707cc076301af181f0ffaee171ac;hb=e0bd52fb8cf3c44ecd1e425d20613219b04963d6;hpb=69ad4f2cbd3f6e787036df0bb513057fec448fe8 diff --git a/bin/wb-graph b/bin/wb-graph index 9419380..743c1af 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; @@ -36,21 +31,21 @@ 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 @archs = qw(alpha arm hppa hurd-i386 i386 ia64 m68k mips mipsel powerpc s390 amd64 sparc armel kfreebsd-amd64 kfreebsd-i386); my $arch; 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,11 +64,12 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print ", 0, 0"; } else { # $total -= $n_state{"Not-For-Us"}; + $total -= $n_state{"Auto-Not-For-Us"}; if ( $previously_built ) { print ", ".$n_state{"Installed"}.", ".$pu_total; } else {