From: Marc Brockschmidt Date: Mon, 14 Sep 2009 20:26:31 +0000 (+0000) Subject: Use the unprivilged service in case it's read-only and not security related. X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=80adc1ea160f423e6cfbb348bf1efefbac89d332 Use the unprivilged service in case it's read-only and not security related. --- diff --git a/bin/wanna-build b/bin/wanna-build index cdfd60c..4ba644e 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -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";