X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwb-graph;h=cd9c5e43ec53f4da2c58b812b7d81cc1ca24a596;hb=07ba7718ac2a6d1841ccb957814abcb002a1f387;hp=2a952d004b2374ef05cbc525c459917cf5d8e1a9;hpb=bf263c8438b11ee7acb1308cf96bfca49ff2781f;p=wannabuild.git diff --git a/bin/wb-graph b/bin/wb-graph index 2a952d0..cd9c5e4 100755 --- a/bin/wb-graph +++ b/bin/wb-graph @@ -42,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 |" ) +$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; } @@ -64,7 +64,7 @@ while( ) { } $lastmsg = $_; } -close( PIPE ); +close( $pipe ); if ($?) { print ", 0, 0"; } else {