]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Don't lock the record in case we just want to read it.
authorMarc Brockschmidt <he@debian.org>
Mon, 14 Sep 2009 20:28:06 +0000 (20:28 +0000)
committerKurt Roeckx <kurt@roeckx.be>
Mon, 14 Sep 2009 20:28:06 +0000 (20:28 +0000)
It's not useful to wait for the lock, and we might not have permission to do so.

bin/wanna-build

index 4ba644ebbdb4149adb1e30f1c8a496a79d389ab5..debcca4db55e1008368d601638b658cce6f71c4b 100755 (executable)
@@ -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 ' .