aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-01 14:44:44 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-01 14:44:44 +0000
commit9b395177428386b4991a463d0e7b809f12563e24 (patch)
tree387d26687be1e56145a918ba4261034b19a2bab9
parentcf426a84a146c2d7f441a861da9b9ccfbacd3c99 (diff)
downloadrpmdrake-9b395177428386b4991a463d0e7b809f12563e24.tar
rpmdrake-9b395177428386b4991a463d0e7b809f12563e24.tar.gz
rpmdrake-9b395177428386b4991a463d0e7b809f12563e24.tar.bz2
rpmdrake-9b395177428386b4991a463d0e7b809f12563e24.tar.xz
rpmdrake-9b395177428386b4991a463d0e7b809f12563e24.zip
(extract_header) ignore packages with no URPM objects (#52751)
-rw-r--r--NEWS1
-rw-r--r--Rpmdrake/pkg.pm6
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 59656c2e..cf1c20c5 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
o fix encoding of diff output (#52994)
o fix for unreproductable crash (#49273)
o fix rare crash when medium is unknown (#49901)
+ o fix rare crash with packages without any URPM objects (#52751)
o update GUI package list
Version 5.18 - 1 October 2009, Thierry Vignaud
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 7b0da077..b97af7d7 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -84,6 +84,12 @@ sub extract_header {
return if $pkg->{$fields{$xml_info}};
my $p = $pkg->{pkg};
+
+ if (!$p) {
+ warn ">> ghost package '$pkg' has no URPM object!!!\n";
+ return;
+ }
+
my $name = urpm_name($p);
# fix extracting info for SRPMS and RPM GPG keys:
$name =~ s!\.src!!;