aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-12 09:41:38 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-12 09:41:38 +0000
commita6cb7323f1eacabb107c85c53b3bfa97787127df (patch)
tree5ccb9dd77174a579353469808468b89b3803b6ca
parent60d2c62eada3cf15226503bff9dd7c909e897128 (diff)
downloadrpmdrake-a6cb7323f1eacabb107c85c53b3bfa97787127df.tar
rpmdrake-a6cb7323f1eacabb107c85c53b3bfa97787127df.tar.gz
rpmdrake-a6cb7323f1eacabb107c85c53b3bfa97787127df.tar.bz2
rpmdrake-a6cb7323f1eacabb107c85c53b3bfa97787127df.tar.xz
rpmdrake-a6cb7323f1eacabb107c85c53b3bfa97787127df.zip
( extract_header) use ensure_utf8() so that we never crash anymore on
garbaged UTF-8 while querying local files
-rw-r--r--Rpmdrake/pkg.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 791eb872..24da2c7c 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -115,9 +115,9 @@ sub extract_header {
$name =~ s!\.src!!;
if ($p->flag_installed && !$p->flag_upgrade) {
- my @files = map { chomp_(to_utf8($_)) } run_rpm("rpm -ql $name");
+ my @files = map { chomp_(ensure_utf8($_)) } run_rpm("rpm -ql $name");
add2hash($pkg, { files => [ @files ? @files : N("(none)") ],
- changelog => format_changelog_string($o_installed_version, to_utf8(scalar(run_rpm("rpm -q --changelog $name")))) });
+ changelog => format_changelog_string($o_installed_version, ensure_utf8(scalar(run_rpm("rpm -q --changelog $name")))) });
} else {
my $medium = pkg2medium($p, $urpm);
my ($local_source, %xml_info_pkgs, $bar_id);