diff options
-rwxr-xr-x | MandrivaUpdate | 2 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | Rpmdrake/formatting.pm | 2 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index 7c3d55e3..fba0ffad 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -90,7 +90,7 @@ sub refresh_packages_list { my ($name, $version, $release, $arch) = split_fullname($_); my $pkg = $pkgs->{$_}; my $raw_medium = pkg2medium($pkg->{pkg}, $urpm); - my $medium = $raw_medium ? $raw_medium->{name} : undef; + my $medium = !$raw_medium->{fake} ? $raw_medium->{name} : undef; my $icon; my $importance = $medium && $descriptions->{$medium}{$name}{importance}; if ($importance) { @@ -1,7 +1,8 @@ - gurpmi.addmedia o fix message when adding distrib media (#49566) - rpmdrake - o fix encoding of diff output (#52994) + o fix rare crash when medium is unknown (#49901) + o fix encoding of diff output (#52994) o fix for unreproductable crash (#49273) o update GUI package list diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index 8c2f7f0c..6e4e0dc7 100644 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -100,7 +100,7 @@ sub pkg2medium { my ($p, $urpm) = @_; return if !ref $p; return { name => N("None (installed)") } if !defined($p->id); # if installed - URPM::pkg2media($urpm->{media}, $p) || undef; + URPM::pkg2media($urpm->{media}, $p) || { name => N("Unknown"), fake => 1 }; } # [ duplicate urpmi's urpm::msg::localtime2changelog() ] diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 05240dd1..79639485 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -138,7 +138,7 @@ sub format_pkg_simplifiedinfo { my $upkg = $pkg->{pkg}; return if !$upkg; my $raw_medium = pkg2medium($upkg, $urpm); - my $medium = $raw_medium ? $raw_medium->{name} : undef; + my $medium = !$raw_medium->{fake} ? $raw_medium->{name} : undef; my $update_descr = $descriptions->{$medium}{$name}; # discard update fields if not matching: my $is_update = ($upkg->flag_upgrade && $update_descr && $update_descr->{pre}); |