summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-11 11:09:35 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-11 11:09:35 +0000
commit948db6e18ec88fbb7394fd09f9489a8185562290 (patch)
tree4663b1e7aa93d42b7dcf658108fcad62d16d6a3c
parentd75279db49ca12cf10d930a7e7b6185ca1e1e04b (diff)
downloadurpmi-948db6e18ec88fbb7394fd09f9489a8185562290.tar
urpmi-948db6e18ec88fbb7394fd09f9489a8185562290.tar.gz
urpmi-948db6e18ec88fbb7394fd09f9489a8185562290.tar.bz2
urpmi-948db6e18ec88fbb7394fd09f9489a8185562290.tar.xz
urpmi-948db6e18ec88fbb7394fd09f9489a8185562290.zip
Fix minor locking bug in urpmq
-rw-r--r--urpm.pm13
-rwxr-xr-xurpmq2
2 files changed, 4 insertions, 11 deletions
diff --git a/urpm.pm b/urpm.pm
index 26cc2ff5..df9b94a1 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2556,23 +2556,16 @@ sub is_delta_installable {
$v_match eq $v_installed;
}
-#- download package that may need to be downloaded.
-#- make sure header are available in the appropriate directory.
-#- change location to find the right package in the local
-#- filesystem for only one transaction.
-#- try to mount/eject removable media here.
-#- return a list of package ready for rpm.
+#- Obsolescent method.
sub download_source_packages {
my ($urpm, $local_sources, $list, %options) = @_;
my %sources = %$local_sources;
my %error_sources;
- #print STDERR "calling obsoleted method urpm::download_source_packages\n";
-
- $urpm->exlock_urpmi_db;
+ $urpm->exlock_urpmi_db unless $options{nolock};
$urpm->copy_packages_of_removable_media($list, \%sources, %options) or return;
$urpm->download_packages_of_distant_media($list, \%sources, \%error_sources, %options);
- $urpm->unlock_urpmi_db;
+ $urpm->unlock_urpmi_db unless $options{nolock};
%sources, %error_sources;
}
diff --git a/urpmq b/urpmq
index 312aa17a..0caa7bb5 100755
--- a/urpmq
+++ b/urpmq
@@ -331,7 +331,7 @@ if ($urpm::args::options{list_aliases}) {
};
$packer->extract($tmp_header_dir, @headers);
} elsif (!%downloads) {
- %downloads = $urpm->download_source_packages({}, $list, force_local => 1);
+ %downloads = $urpm->download_source_packages({}, $list, force_local => 1, nolock => $urpm::args::options{nolock});
}
}
}