From a643f5463deb0e3890832eeadaf4f25c03aa3e80 Mon Sep 17 00:00:00 2001 From: Marc Brockschmidt Date: Mon, 14 Sep 2009 20:28:06 +0000 Subject: [PATCH] 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. --- bin/wanna-build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ' . -- 2.39.2