]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Use the unprivilged service in case it's read-only and not security related.
authorMarc Brockschmidt <he@debian.org>
Mon, 14 Sep 2009 20:26:31 +0000 (20:26 +0000)
committerKurt Roeckx <kurt@roeckx.be>
Mon, 14 Sep 2009 20:26:31 +0000 (20:26 +0000)
bin/wanna-build

index cdfd60c86b03c80684ad730a2c8b476fdfd3c139..4ba644ebbdb4149adb1e30f1c8a496a79d389ab5 100755 (executable)
@@ -303,8 +303,7 @@ END {
 }
 
 my $schema_suffix = '';
-# TODO: Base this on something else, like an option that is passed.
-if ($real_user eq 'nobody') {
+if (isin( $op_mode, qw(list info)) && $distribution !~ /security/) {
        $dbh = DBI->connect("DBI:Pg:service=wanna-build") || 
                die "FATAL: Cannot open database: $DBI::errstr\n";
        $schema_suffix = '_public';
@@ -897,12 +896,6 @@ 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";