From a29fa866dbb7dfa41a18da4d636639fb39634b72 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 10 Sep 2007 16:53:02 +0000 Subject: (rpm_summary) kill it; since perl-URPM-1.56, perl knows that strings from rpm headers are UTF-8, thus fixing a crash (#33283) --- Rpmdrake/formatting.pm | 8 +------- Rpmdrake/pkg.pm | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index 567855dc..0da48a43 100644 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -33,15 +33,9 @@ use ugtk2 qw(escape_text_for_TextView_markup_format); use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(format_field format_header localtime2changelog my_fullname pkg2medium rpm_description rpm_summary split_fullname urpm_name); +our @EXPORT = qw(format_field format_header localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name); -sub rpm_summary { - my ($summary) = @_; - utf8::decode($summary) if !utf8::is_utf8($summary); - $summary; -} - sub rpm_description { my ($description) = @_; utf8::decode($description); diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 8e77a5a6..41cc9556 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -342,7 +342,7 @@ sub get_pkgs { #- Extract summary and description since they'll be lost when the header is packed $all_pkgs{$fullname} = { selected => 0, pkg => $pkg, urpm_name => urpm_name($pkg), - summary => rpm_summary($pkg->summary), + summary => $pkg->summary, description => rpm_description($pkg->description), } if !($all_pkgs{$fullname} && $all_pkgs{$fullname}{description}); if (my $name = $base{$fullname}) { @@ -425,7 +425,7 @@ sub get_pkgs { } } $all_pkgs{urpm_name($pkg)} = { selected => $selected, pkg => $pkg, - summary => rpm_summary($pkg->summary), + summary => $pkg->summary, }; } if ($::rpmdrake_options{'pkg-sel'} && $::rpmdrake_options{'pkg-nosel'}) { -- cgit v1.2.1