summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-19 16:43:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-19 16:43:38 +0000
commitd82b7fab541770bcc3a90879c79bafb1e2baf776 (patch)
treeae9f13fff01461ffd4194948e8059075d6eb337b
parent9019db5fb33f9b77de9b415f7483cb48105f11b9 (diff)
downloadurpmi-d82b7fab541770bcc3a90879c79bafb1e2baf776.tar
urpmi-d82b7fab541770bcc3a90879c79bafb1e2baf776.tar.gz
urpmi-d82b7fab541770bcc3a90879c79bafb1e2baf776.tar.bz2
urpmi-d82b7fab541770bcc3a90879c79bafb1e2baf776.tar.xz
urpmi-d82b7fab541770bcc3a90879c79bafb1e2baf776.zip
we really don't want logs on stdout for urpmq/urpmf
(esp. for "adding medium ..." when using --use-distrib)
-rwxr-xr-xurpmf4
-rwxr-xr-xurpmq5
2 files changed, 6 insertions, 3 deletions
diff --git a/urpmf b/urpmf
index 1ee7604c..5b61b775 100755
--- a/urpmf
+++ b/urpmf
@@ -119,7 +119,9 @@ if ($qf eq '%default') {
#- replace first %name by %fullname if -f was specified
if ($full) { $qf =~ s/%name\b/%fullname/ }
-$verbose or $urpm->{log} = sub {};
+#- we really don't want logs on stdout, and remove verbose if not asked.
+$urpm->{info} = sub { print STDERR "$_[0]\n" };
+$urpm->{log} = $verbose ? sub { print STDERR "$_[0]\n" } : sub {};
my $multitag = '';
my %multitags = map { $_ => 1 } qw(conffiles conflicts files obsoletes provides requires);
diff --git a/urpmq b/urpmq
index 6348e281..41a8037a 100755
--- a/urpmq
+++ b/urpmq
@@ -122,8 +122,9 @@ sub escape_shell ($) {
my $urpm = new urpm;
urpm::args::parse_cmdline(urpm => $urpm) or exit(1);
-#- remove verbose if not asked.
-$urpm::args::options{verbose} or $urpm->{log} = sub {};
+#- we really don't want logs on stdout, and remove verbose if not asked.
+$urpm->{info} = sub { print STDERR "$_[0]\n" };
+$urpm->{log} = $urpm::args::options{verbose} ? sub { print STDERR "$_[0]\n" } : sub {};
#- improve speed if using any list_... options.
$urpm::args::options{nodepslist} = $urpm::args::options{list_aliases}