}
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';
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;
}