aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-21 16:16:14 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-21 16:16:14 +0000
commit1fc0f1af3e7056ce5f860b237f5d846caa6b586d (patch)
tree194e871d6b85dc08c62b6802f68fc5a1c21a87fe
parentcd16428d8f27757bd469e34bc2fb98a1c55de996 (diff)
downloadrpmdrake-1fc0f1af3e7056ce5f860b237f5d846caa6b586d.tar
rpmdrake-1fc0f1af3e7056ce5f860b237f5d846caa6b586d.tar.gz
rpmdrake-1fc0f1af3e7056ce5f860b237f5d846caa6b586d.tar.bz2
rpmdrake-1fc0f1af3e7056ce5f860b237f5d846caa6b586d.tar.xz
rpmdrake-1fc0f1af3e7056ce5f860b237f5d846caa6b586d.zip
make failing to open RPM DB non fatal when reseting selection (mga#7352)
(backported from trunk)
-rw-r--r--NEWS3
-rwxr-xr-xrpmdrake7
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 223f9a0c..672a283a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
+- display package basenames when signature checking fails
- fix changelog highlighting
- makes --merge-all-rpmnew option slight faster
+- rpmdrake:
+ o make failing to open RPM DB non fatal when reseting selection (mga#7352)
Version 5.34 - 13 May 2012, Pascal Terjan
diff --git a/rpmdrake b/rpmdrake
index 31700da0..4af44535 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -550,8 +550,13 @@ sub run_treeview_dialog {
),
[ N("/_File") . N("/_Reset the selection"), undef, sub {
if ($MODE ne 'remove') {
+ my $db = eval { open_rpm_db() };
+ if (!ref($db)) {
+ statusbar_msg(N("Reset aborted (RPM DB is locked by another process)"), 1);
+ return;
+ };
$urpm->disable_selected(
- open_rpm_db(), $urpm->{state},
+ $db, $urpm->{state},
map { if_($pkgs->{$_}{selected}, $pkgs->{$_}{pkg}) } keys %$pkgs,
);
}