aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/edit_urpm_sources.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake/edit_urpm_sources.pm')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 2222b644..12e4a3a2 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -1164,16 +1164,21 @@ sub run() {
my $lock;
{
$urpm = fast_open_urpmi_db();
+ my $err_msg = "urpmdb locked\n";
local $urpm->{fatal} = sub {
interactive_msg('rpmdrake',
N("Packages database is locked. Please close other applications
working with packages database (do you have another media
manager on another desktop, or are you currently installing
packages as well?)."));
- myexit -1;
+ die $err_msg;
};
# lock urpmi DB
- $lock = urpm::lock::urpmi_db($urpm, 'exclusive', wait => $urpm->{options}{wait_lock});
+ eval { $lock = urpm::lock::urpmi_db($urpm, 'exclusive', wait => $urpm->{options}{wait_lock}) };
+ if (my $err = $@) {
+ return if $err eq $err_msg;
+ die $err;
+ }
}
my $res = mainwindow();