diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-05-08 04:59:00 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-05-08 04:59:00 +0000 |
commit | 8181c02c47ec4ad9c828a808afc28ba8b94a6250 (patch) | |
tree | fd681ad1574bfec63a46951b961aa618143075ed | |
parent | 0cf523dde2d5af5bda224fdb9caf0177b8a126ae (diff) | |
download | rpmdrake-8181c02c47ec4ad9c828a808afc28ba8b94a6250.tar rpmdrake-8181c02c47ec4ad9c828a808afc28ba8b94a6250.tar.gz rpmdrake-8181c02c47ec4ad9c828a808afc28ba8b94a6250.tar.bz2 rpmdrake-8181c02c47ec4ad9c828a808afc28ba8b94a6250.tar.xz rpmdrake-8181c02c47ec4ad9c828a808afc28ba8b94a6250.zip |
- handle gracefully locked RPM DB when trying to install some packages
(#40244)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,5 @@ +- handle gracefully locked RPM DB when trying to install some packages + (#40244) - rpmdrake: o fix a crash when default view is unknown (#40025) o fix searching when numeric pad's return key is pressed diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index d4e83895..66d02607 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -374,7 +374,12 @@ sub get_pkgs { $gurpm->label(N("Please wait, listing base packages...")); $gurpm->progress($level); - 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; |