aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-14 16:17:09 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-14 16:17:09 +0000
commit1499cc65dbbaa08485adbaa5a5f70dfee66d39e4 (patch)
tree6eefea7401161ad92d667e67eb9aae76a0bced99 /Rpmdrake
parent4bc366b9241143d35422fa6edb930a326ccfa5b6 (diff)
downloadrpmdrake-1499cc65dbbaa08485adbaa5a5f70dfee66d39e4.tar
rpmdrake-1499cc65dbbaa08485adbaa5a5f70dfee66d39e4.tar.gz
rpmdrake-1499cc65dbbaa08485adbaa5a5f70dfee66d39e4.tar.bz2
rpmdrake-1499cc65dbbaa08485adbaa5a5f70dfee66d39e4.tar.xz
rpmdrake-1499cc65dbbaa08485adbaa5a5f70dfee66d39e4.zip
(run) do not exit if urpmi db, just return so that rpmdrake doesn't
exit then (no behavior change for edit-urpm-sources)
Diffstat (limited to 'Rpmdrake')
-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();