aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-13 14:12:32 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-13 14:12:32 +0000
commite6374fad0353d656d9df81c27765b4429676c04e (patch)
treeeb8ebd3500d19c0f253e7ecac6266df31392d1c2 /Rpmdrake
parentefa0b6fca199d17e20a8909fe8a805f4b27ec1f0 (diff)
downloadrpmdrake-e6374fad0353d656d9df81c27765b4429676c04e.tar
rpmdrake-e6374fad0353d656d9df81c27765b4429676c04e.tar.gz
rpmdrake-e6374fad0353d656d9df81c27765b4429676c04e.tar.bz2
rpmdrake-e6374fad0353d656d9df81c27765b4429676c04e.tar.xz
rpmdrake-e6374fad0353d656d9df81c27765b4429676c04e.zip
(extract_header,run_rpm) factorize calling ensure_utf8() in run_rpm(),
thus enabling to fix UTF-8-ness per-line, thus reducing the number of garbaged accents in changelogs
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/pkg.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 9b32f4a4..e667183b 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -94,7 +94,7 @@ sub run_rpm {
foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) {
local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} && $ENV{$_} !~ /UTF-8/;
}
- my @l = `@_`;
+ my @l = map { ensure_utf8($_) } `@_`;
wantarray() ? @l : join('', @l);
}
@@ -115,9 +115,9 @@ sub extract_header {
$name =~ s!\.src!!;
if ($p->flag_installed && !$p->flag_upgrade) {
- my @files = map { chomp_(ensure_utf8($_)) } run_rpm("rpm -ql $name");
+ my @files = map { chomp_($_) } run_rpm("rpm -ql $name");
add2hash($pkg, { files => [ @files ? @files : N("(none)") ],
- changelog => format_changelog_string($o_installed_version, ensure_utf8(scalar(run_rpm("rpm -q --changelog $name")))) });
+ changelog => format_changelog_string($o_installed_version, scalar(run_rpm("rpm -q --changelog $name"))) });
} else {
my $medium = pkg2medium($p, $urpm);
my ($local_source, %xml_info_pkgs, $bar_id);