X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=blobdiff_plain;f=bin%2Fwanna-build;h=5d3f4b7d6577c0ee9bd08874279b5121389ebc8e;hp=77f4ac3b16998a0af0b351e23e06723a2da4dffc;hb=d663a834bd6840d712f702dd14a9f65523d929f3;hpb=66c96bf07264477180e04399924431992cda7988 diff --git a/bin/wanna-build b/bin/wanna-build index 77f4ac3..5d3f4b7 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -605,17 +605,14 @@ sub add_one_building { $ok = 1; my $pkg = shift; if (defined($pkg)) { - if ($pkg->{'state'} eq "Not-For-Us") { + my $pkgnack = { + 'Not-For-Us' => 'not suitable for this architecture', + 'Dep-Wait' => 'not all source dependencies available yet', + 'BD-Uninstallable' => 'source dependencies are not installable', + }; + if ($pkgnack->{$pkg->{'state'}}) { $ok = 0; - $reason = "not suitable for this architecture"; - } - elsif ($pkg->{'state'} =~ /^Dep-Wait/) { - $ok = 0; - $reason = "not all source dependencies available yet"; - } - elsif ($pkg->{'state'} =~ /^BD-Uninstallable/) { - $ok = 0; - $reason = "source dependencies are not installable"; + $reason = $pkgnack->{$pkg->{'state'}}; } elsif ($pkg->{'state'} eq "Uploaded" && (version_lesseq($version, $pkg->{'version'}))) {