X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwanna-build;h=cdfd60c86b03c80684ad730a2c8b476fdfd3c139;hb=4056cd30f3cfda96a2fd3ed622b15cbe31738586;hp=c04c25827294218824191aaca922a5e428424bcf;hpb=1790031ba720b0389c5371ba8444a3fdb37ad511;p=wannabuild.git diff --git a/bin/wanna-build b/bin/wanna-build index c04c258..cdfd60c 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -897,6 +897,12 @@ sub add_one_needsbuild { } $state = $pkg->{'state'}; + if ($state eq "Needs-Build") + { + print "$name: Already in Needs-Build.\n"; + return; + } + if ($state eq "BD-Uninstallable") { if ($opt_override) { print "$name: Forcing uninstallability mark to be removed. This is not permanent and might be reset with the next trigger run\n"; @@ -938,7 +944,8 @@ sub add_one_needsbuild { } } if (defined ($pkg->{'builder'}) && $user ne $pkg->{'builder'} && - !($pkg->{'builder'} =~ /^(\w+)-\w+/ && $1 eq $user)) { + !($pkg->{'builder'} =~ /^(\w+)-\w+/ && $1 eq $user) && + !$opt_override) { print "$name: not taken by you, but by ". "$pkg->{'builder'}. Skipping.\n"; return; @@ -2349,6 +2356,7 @@ sub usage { Usage: $prgname Options: -v, --verbose: Verbose execution. + -A arch: Architecture this operation is for. --take: Take package for building [default operation] -f, --failed: Record in database that a build failed due to deficiencies in the package (that aren't fixable without a new @@ -2419,7 +2427,8 @@ sub user_table_name { sub get_source_info { my $name = shift; my $pkg = $dbh->selectrow_hashref('SELECT * FROM ' . - table_name() . ' WHERE package = ? AND distribution = ?', + table_name() . ' WHERE package = ? AND distribution = ?' . + 'FOR UPDATE', undef, $name, $distribution); return $pkg; }