aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi/grpmi.pl
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-03 15:46:27 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-03 15:46:27 +0000
commit9c4ca99357fe3cf7075aa6e70ff93b095f2a288a (patch)
tree7f15bc86e31a9b7efca09d3f7d5de4684f8ae0f7 /grpmi/grpmi.pl
parent1ebdc6b641e7cbd75a6ca6873131e2b45968c5c0 (diff)
downloadrpmdrake-9c4ca99357fe3cf7075aa6e70ff93b095f2a288a.tar
rpmdrake-9c4ca99357fe3cf7075aa6e70ff93b095f2a288a.tar.gz
rpmdrake-9c4ca99357fe3cf7075aa6e70ff93b095f2a288a.tar.bz2
rpmdrake-9c4ca99357fe3cf7075aa6e70ff93b095f2a288a.tar.xz
rpmdrake-9c4ca99357fe3cf7075aa6e70ff93b095f2a288a.zip
fix error reporting (of gpg, rpm, curl) broken in non english
Diffstat (limited to 'grpmi/grpmi.pl')
-rwxr-xr-xgrpmi/grpmi.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index 2ed77e85..74d8dd24 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -47,6 +47,7 @@ sub N {
my $s = shift @_; my $t = translate($s);
sprintf_fixutf8 $t, @_;
}
+sub utf8ize { c::set_tagged_utf8($_[0]); $_[0] }
sub mexit { ugtk2::exit(undef, @_) }
sub interactive_msg {
@@ -106,8 +107,8 @@ foreach my $arg (@ARGV) {
retry_download:
$label->set(N("Downloading package `%s' (%s/%s)...", basename($url), $download_progress, $nb_downloads));
select(undef, undef, undef, 0.1); $mainw->flush; #- hackish :-(
- my $res = curl_download::download($url, $cache_location,
- sub { $_[0] and $progressbar->set_fraction($_[1]/$_[0]); $mainw->flush });
+ my $res = utf8ize(curl_download::download($url, $cache_location,
+ sub { $_[0] and $progressbar->set_fraction($_[1]/$_[0]); $mainw->flush }));
if ($res) {
my $results = interactive_msg(N("Error during download"),
N("There was an error downloading package:
@@ -135,7 +136,7 @@ if (!member('--no-verify-rpm', @ARGV)) {
if (-f $arg) {
$yes_to_all and next;
$label->set(N("Verifying signature of `%s'...", basename($arg))); $mainw->flush;
- if (my $res = grpmi_rpm::verify_sig($arg)) {
+ if (my $res = utf8ize(grpmi_rpm::verify_sig($arg))) {
my $results = interactive_msg(N("Signature verification error"),
N("The signature of the package `%s' is not correct:
@@ -194,7 +195,7 @@ Install aborted.",
return 0;
}
- my $res = chomp_(grpmi_rpm::install_packages(\&install_packages_callback, @ARGV));
+ my $res = chomp_(utf8ize(grpmi_rpm::install_packages(\&install_packages_callback, @ARGV)));
if ($res) {
interactive_msg(N("Problems occurred during installation"), N("There was an error during packages installation:\n\n%s", $res));
goto cleanup;