aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-01-13 22:20:28 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-01-13 22:26:10 +0100
commit278abdfda77181caaa30e639b33438d22d7f1398 (patch)
tree57d6e5ee363c8992e686850a4a4e498c31cc7aa5
parent7c3d8f8a853d00a13b1d44965ff16bbd480482ae (diff)
downloadrpmdrake-278abdfda77181caaa30e639b33438d22d7f1398.tar
rpmdrake-278abdfda77181caaa30e639b33438d22d7f1398.tar.gz
rpmdrake-278abdfda77181caaa30e639b33438d22d7f1398.tar.bz2
rpmdrake-278abdfda77181caaa30e639b33438d22d7f1398.tar.xz
rpmdrake-278abdfda77181caaa30e639b33438d22d7f1398.zip
fix a crash when trying to debug an old issue (mga#8967)
it's stupid to crash when trying to do so...
-rw-r--r--NEWS3
-rw-r--r--Rpmdrake/gui.pm9
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 49513016..98944c1f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- rpmdrake:
+ o fix a crash when trying to debug an old issue (mga#8967)
+
Version 5.49 - 9 May 2013, Thomas Backlund
- --merge-all-rpmnew mode:
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index f0ca57bc..0fb3b8d6 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -384,7 +384,14 @@ sub node_state {
return 'XXX' if !$name;
my $pkg = $pkgs->{$name};
my $urpm_obj = $pkg->{pkg};
- return warn_if_no_pkg($name) if !$urpm_obj;
+ if (!$urpm_obj) {
+ my $res = eval { warn_if_no_pkg($name) };
+ if (my $err = $@) {
+ warn "ERROR: $err\n";
+ log::explanations("ERROR: $err");
+ }
+ return $res;
+ }
$pkg->{selected} ?
($urpm_obj->flag_installed ?
($urpm_obj->flag_upgrade ? 'to_install' : 'to_remove')