use vars qw($dist);
my $previously_built;
-$dist = "unstable";
+$dist = "sid";
while( @ARGV && $ARGV[0] =~ /^-/ ) {
$_ = shift @ARGV;
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;
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;
}
}
$lastmsg = $_;
}
-close( PIPE );
+close( $pipe );
if ($?) {
print ", 0, 0";
} else {