use vars qw($verbose $dist $database);
$verbose = 0;
-$dist = "unstable";
+$dist = "sid";
$database = "build-db";
while( @ARGV && $ARGV[0] =~ /^-/ ) {
else {
$dist = shift @ARGV;
}
- $dist = "stable" if $dist eq "s";
- $dist = "testing" if $dist eq "t";
- $dist = "unstable" if $dist eq "u";
- die "Bad distribution\n" if !isin($dist, qw(stable testing unstable stable-security testing-security oldstable oldstable-security));
}
elsif (/^--$/) {
last;
}
my($lastmsg, %n_state, $total, %n_builder);
-open( PIPE, "wanna-build --database=$database --dist=$dist --list=all 2>&1 |" )
+open( my $pipe, '-|', "wanna-build --database=$database --dist=$dist --list=all 2>&1" )
or die "Cannot spawn wanna-build: $!\n";
-while( <PIPE> ) {
+while( <$pipe> ) {
if (/^Database for $dist doesn't exist$/) {
exit 1;
}
}
$lastmsg = $_;
}
-close( PIPE );
+close( $pipe );
if ($?) {
print "$lastmsg";
die "Bad exit status $? from wanna-build\n";
my $total_width = 78;
my @state_list = qw(Installed Needs-Build Building Built Build-Attempted Uploaded Failed Dep-Wait
- Failed-Removed Dep-Wait-Removed
+ Failed-Removed Dep-Wait-Removed BD-Uninstallable
Not-For-Us);
my $statewidth = 0;
grep { $statewidth = length($_) if length($_) > $statewidth } @state_list;
print percent(qw(Needs-Build)), " uncompiled\n";
print percent(qw(Building)), " currently building (short-term delay)\n";
print percent(qw(Build-Attempted)), " currently failed building (short-term delay)\n";
-print percent(qw(Failed Dep-Wait)), " failed or waiting (long-term delay)\n";
+print percent(qw(Failed BD-Uninstallable Dep-Wait)), " failed or waiting (long-term delay)\n";
exit 0;