aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-05-08 05:00:11 +0000
committerThierry Vignaud <tv@mandriva.org>2008-05-08 05:00:11 +0000
commit7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d (patch)
treef42a632a69859dc3550d973e556c689d612d14db
parent0780a3e4f213472018e4ebabd78f0e99f22724d7 (diff)
downloadrpmdrake-7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d.tar
rpmdrake-7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d.tar.gz
rpmdrake-7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d.tar.bz2
rpmdrake-7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d.tar.xz
rpmdrake-7bf39e3ab3e48f2eac30f0dce3060dfc10d1086d.zip
- handle gracefully locked RPM DB when trying to install some packages
(#40244)
-rw-r--r--.perl_checker1
-rw-r--r--Rpmdrake/pkg.pm7
2 files changed, 7 insertions, 1 deletions
diff --git a/.perl_checker b/.perl_checker
index badba578..90136074 100644
--- a/.perl_checker
+++ b/.perl_checker
@@ -5,6 +5,7 @@ Date::Manip
Digest::Perl::MD5
Digest::base
Encode
+feature
File::Basename
File::Find
File::FnMatch
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 71a025df..761e97db 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -277,7 +277,12 @@ sub get_pkgs {
my @base = ("basesystem", split /,\s*/, $urpm->{global_config}{'prohibit-remove'});
my (%base, %basepackages);
- my $db = open_rpm_db();
+ my $db = eval { open_rpm_db() };
+ if (my $err = $@) {
+ interactive_msg(N("Error"), N("A fatal error occurred: %s.", $err));
+ return;
+ }
+
my $sig_handler = sub { undef $db; exit 3 };
local $SIG{INT} = $sig_handler;
local $SIG{QUIT} = $sig_handler;