From: Marc Brockschmidt Date: Mon, 14 Sep 2009 20:28:06 +0000 (+0000) Subject: Don't lock the record in case we just want to read it. X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=a643f5463deb0e3890832eeadaf4f25c03aa3e80 Don't lock the record in case we just want to read it. It's not useful to wait for the lock, and we might not have permission to do so. --- diff --git a/bin/wanna-build b/bin/wanna-build index 4ba644e..debcca4 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -1831,7 +1831,7 @@ sub info_packages { foreach $dist (@dists) { my $pname = "$name" . ($info_all_dists ? "($dist)" : ""); - $pkg = get_source_info($name); + $pkg = get_readonly_source_info($name); if (!defined( $pkg )) { print "$pname: not registered\n"; next; @@ -2417,6 +2417,14 @@ sub user_table_name { return '"' . $arch . $schema_suffix . '".users'; } +sub get_readonly_source_info { + my $name = shift; + my $pkg = $dbh->selectrow_hashref('SELECT * FROM ' . + table_name() . ' WHERE package = ? AND distribution = ?', + undef, $name, $distribution); + return $pkg; +} + sub get_source_info { my $name = shift; my $pkg = $dbh->selectrow_hashref('SELECT * FROM ' .