]> git.donarmstrong.com Git - wannabuild.git/commitdiff
fix distribution=any-priv (by moving it prior of opening the database)
authorAndreas Barth <aba@not.so.argh.org>
Fri, 11 Feb 2011 19:23:09 +0000 (19:23 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Fri, 11 Feb 2011 19:23:09 +0000 (19:23 +0000)
bin/wanna-build

index 5b3afb15c92017c2ab9c8f2e527a984b08cbad8c..2101f18b1f7e09c47005440bc8401cdc7c06fcb0 100755 (executable)
@@ -269,6 +269,15 @@ END {
        }
 }
 
+if ($distribution eq 'any-priv') {
+    $privmode = 'yes';
+    $distribution = 'any';
+}
+if ($distribution eq 'any-unpriv') {
+    $privmode = 'no';
+    $distribution = 'any';
+}
+
 my $schema_suffix = '';
 $recorduser //= (not -t and $user =~ /^buildd_/);
 if (isin( $op_mode, qw(list info)) && $distribution !~ /security/ && !$recorduser && !($privmode eq 'yes')) {
@@ -305,14 +314,6 @@ $distribution = $distribution_aliases{$distribution} if (isin($distribution, key
 $op_mode = $category ? "set-failed" : "set-building"
        if !$op_mode; # default operation
 $distribution ||= "sid";
-if ($distribution eq 'any-priv') {
-    $privmode = 'yes';
-    $distribution = 'any';
-}
-if ($distribution eq 'any-unpriv') {
-    $privmode = 'no';
-    $distribution = 'any';
-}
 undef $distribution if $distribution eq 'any';
 if ($distribution) {
     my @dists = split(/[, ]+/, $distribution);