diff options
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 2 | ||||
-rw-r--r-- | Rpmdrake/open_db.pm | 3 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index b44abdd8..6c8c2cfb 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -1173,7 +1173,7 @@ packages as well?).")); myexit -1; }; # lock urpmi DB - $lock = urpm::lock::urpmi_db($urpm, 'exclusive'); + $lock = urpm::lock::urpmi_db($urpm, 'exclusive', wait => $urpm->{options}{wait_lock}); } my $res = mainwindow(); 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; } diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 6effac08..ef3c6baa 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -169,7 +169,7 @@ sub warn_about_media { # and no need to fully configure urpmi since we may have to do it again anyway because of new media: my $urpm = fast_open_urpmi_db(); - my $_lock = urpm::lock::urpmi_db($urpm); + my $_lock = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}); # build media list: @update_medias = get_update_medias($urpm); @@ -510,7 +510,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( return perform_parallel_install($urpm, $group, \$statusbar_msg_id); } - my $lock = urpm::lock::urpmi_db($urpm); + my $lock = urpm::lock::urpmi_db($urpm, undef, wait => $urpm->{options}{wait_lock}); my $rpm_lock = urpm::lock::rpm_db($urpm, 'exclusive'); my $state = $probe_only_for_updates ? { } : $urpm->{rpmdrake_state}; |