aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/open_db.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-11-23 13:18:54 +0000
committerThierry Vignaud <tv@mandriva.org>2007-11-23 13:18:54 +0000
commitbb84bb3c16c48a0a56090aedd2d6ee104a9a305e (patch)
tree17e9f01e3f362ef531df1123098f07e4fbfb9ea9 /Rpmdrake/open_db.pm
parent1b1a59805e4403ff23b472fd6cd2f1eeaf93a533 (diff)
downloadrpmdrake-bb84bb3c16c48a0a56090aedd2d6ee104a9a305e.tar
rpmdrake-bb84bb3c16c48a0a56090aedd2d6ee104a9a305e.tar.gz
rpmdrake-bb84bb3c16c48a0a56090aedd2d6ee104a9a305e.tar.bz2
rpmdrake-bb84bb3c16c48a0a56090aedd2d6ee104a9a305e.tar.xz
rpmdrake-bb84bb3c16c48a0a56090aedd2d6ee104a9a305e.zip
add support for --wait-lock option
Diffstat (limited to 'Rpmdrake/open_db.pm')
-rw-r--r--Rpmdrake/open_db.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index 80a28bad..54a52c58 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -62,6 +62,7 @@ sub fast_open_urpmi_db() {
my $error_happened;
$urpm->{options}{'split-level'} ||= 20;
$urpm->{options}{'split-length'} ||= 1;
+ $urpm->{options}{wait_lock} = $::rpmdrake_options{'wait-lock'};
$urpm->{options}{'verify-rpm'} = !$::rpmdrake_options{'no-verify-rpm'} if defined $::rpmdrake_options{'no-verify-rpm'};
$urpm->{options}{auto} = $::rpmdrake_options{auto} if defined $::rpmdrake_options{auto};
urpm::set_files($urpm, $::rpmdrake_options{'urpmi-root'}[0]) if $::rpmdrake_options{'urpmi-root'}[0];
@@ -89,7 +90,7 @@ sub open_urpmi_db() {
my $media = ref $::rpmdrake_options{media} ? join(',', @{$::rpmdrake_options{media}}) : '';
my $searchmedia = join(',', map { $_->{name} } grep { $_->{ignore} && $_->{name} =~ /backport/i } @{$urpm->{media}});
- $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef);
+ $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock});
urpm::media::configure($urpm, media => $media, if_($searchmedia, searchmedia => $searchmedia));
$urpm;
}