summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-01 14:02:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-01 14:02:14 +0000
commit94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19 (patch)
treed16a9b61be96f1f821205cdf74675ed7a83b9fc6
parent8265e240c71f71e21067bea8fd4ee3b24136ffd4 (diff)
downloadurpmi-94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19.tar
urpmi-94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19.tar.gz
urpmi-94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19.tar.bz2
urpmi-94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19.tar.xz
urpmi-94b05bcf8f3efd79e5a10e5fea88ef472ba3ba19.zip
Print usage messages to stdout, not stderr
-rw-r--r--gurpmi.pm2
-rw-r--r--urpme2
-rwxr-xr-xurpmf2
-rwxr-xr-xurpmi2
-rwxr-xr-xurpmi.addmedia2
-rwxr-xr-xurpmi.removemedia5
-rwxr-xr-xurpmi.update2
-rwxr-xr-xurpmq2
8 files changed, 11 insertions, 8 deletions
diff --git a/gurpmi.pm b/gurpmi.pm
index 06a6aa6d..1f58ba2f 100644
--- a/gurpmi.pm
+++ b/gurpmi.pm
@@ -21,7 +21,7 @@ our @ISA = qw(Exporter);
our @EXPORT = qw(fatal but quit add_button_box new_label N);
sub usage () {
- print STDERR <<USAGE;
+ print <<USAGE;
gurpmi version $urpm::VERSION
Usage :
gurpmi <rpm> [ <rpm>... ]
diff --git a/urpme b/urpme
index 82bc8682..60ed98bd 100644
--- a/urpme
+++ b/urpme
@@ -33,7 +33,7 @@ my $noexpr = N("Nn");
my $yesexpr = N("Yy");
sub usage {
- print STDERR N("urpme version %s
+ print N("urpme version %s
Copyright (C) 1999-2005 Mandrakesoft.
This is free software and may be redistributed under the terms of the GNU GPL.
diff --git a/urpmf b/urpmf
index e537292a..133f67ae 100755
--- a/urpmf
+++ b/urpmf
@@ -24,7 +24,7 @@ use urpm::args;
use urpm::msg;
sub usage {
- print STDERR N("urpmf version %s
+ print N("urpmf version %s
Copyright (C) 2002-2004 Mandrakesoft.
This is free software and may be redistributed under the terms of the GNU GPL.
diff --git a/urpmi b/urpmi
index d10a49c2..baa7ed55 100755
--- a/urpmi
+++ b/urpmi
@@ -68,7 +68,7 @@ $ENV{HOME} ||= "/root";
$ENV{USER} ||= "root";
sub usage {
- print STDERR N("urpmi version %s
+ print N("urpmi version %s
Copyright (C) 1999-2005 Mandrakesoft.
This is free software and may be redistributed under the terms of the GNU GPL.
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 41ffc424..4574ae81 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -78,7 +78,7 @@ and [options] are from
") . N(" -q - quiet mode.
") . N(" -v - verbose mode.
");
- warn $m ? "$usage\n$m" : $usage;
+ print $m ? "$usage\n$m" : $usage;
exit 0;
}
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 601b60b4..5db1f006 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -39,7 +39,8 @@ sub main {
/^--?y$/ and $options{strict_match} = 0, next;
/^--?v$/ and $options{verbose} = 1, next;
/^--?q$/ and $options{verbose} = 0, next;
- /^-/ and die N("usage: urpmi.removemedia [-a] <name> ...
+ /^-/ and do {
+ print N("usage: urpmi.removemedia [-a] <name> ...
where <name> is a medium name to remove.
") . N(" --help - print this help message.
") . N(" -a - select all media.
@@ -48,6 +49,8 @@ where <name> is a medium name to remove.
") . N(" -q - quiet mode.
") . N(" -v - verbose mode.
") . (/^--?h(?:elp)$/ ? '' : N("\nunknown options '%s'\n", $_));
+ exit 0;
+ };
}
push @toremoves, $_;
}
diff --git a/urpmi.update b/urpmi.update
index 1ed9eea8..2ae26ec5 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -25,7 +25,7 @@ use urpm::msg;
use urpm::download ();
sub usage {
- warn N("usage: urpmi.update [options] <name> ...
+ print N("usage: urpmi.update [options] <name> ...
where <name> is a medium name to update.
") . N(" --help - print this help message.
") . N(" --wget - use wget to retrieve distant files.
diff --git a/urpmq b/urpmq
index 6ef555f8..355defa4 100755
--- a/urpmq
+++ b/urpmq
@@ -35,7 +35,7 @@ our @names;
our @src_names;
sub usage {
- print STDERR N("urpmq version %s
+ print N("urpmq version %s
Copyright (C) 2000-2005 Mandrakesoft.
This is free software and may be redistributed under the terms of the GNU GPL.