From e2e4359f40f3a292b92e9b630c7d441e4acf2816 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 22 Nov 2007 15:49:43 +0000 Subject: - all tools: o exit with code 1 after displaying usage (instead of exit code 0) (urpmi exit code "1" is correctly documented in urpmi's manpage) --- NEWS | 2 ++ rpm-find-leaves | 2 +- urpme | 2 +- urpmf | 2 +- urpmi | 2 +- urpmi.addmedia | 2 +- urpmi.recover | 2 +- urpmi.removemedia | 2 +- urpmi.update | 2 +- urpmq | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index e11dda4e..09135fe0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- all tools: + o exit with code 1 after displaying usage (instead of exit code 0) - urpmi: o with rsync, use --copy-links (to have the same behaviour as http/ftp, and so allow symlinks on the server) diff --git a/rpm-find-leaves b/rpm-find-leaves index 83e48056..f41c0a26 100644 --- a/rpm-find-leaves +++ b/rpm-find-leaves @@ -35,7 +35,7 @@ while ($_ = shift) { next; }; $_ eq '-f' and do { $options{fullname} = 1; next }; - print $usage; exit 0; + print $usage; exit 1; } my @packages; diff --git a/urpme b/urpme index e848870a..71d2ea33 100644 --- a/urpme +++ b/urpme @@ -58,7 +58,7 @@ usage: ") . N(" --verbose, -v - verbose mode. ") . N(" -a - select all packages matching expression. "); - exit(0); + exit(1); } @ARGV or usage(); diff --git a/urpmf b/urpmf index 6445b9b3..3db657e2 100755 --- a/urpmf +++ b/urpmf @@ -84,7 +84,7 @@ usage: urpmf [options] pattern-expression ") . N(" -m - the media in which the package was found ") . N(" -f - print version, release and arch with name. "); - exit(0); + exit(1); } #- default options. diff --git a/urpmi b/urpmi index 307a6bcb..bb24cdd3 100755 --- a/urpmi +++ b/urpmi @@ -154,7 +154,7 @@ usage: ") . N(" --verbose, -v - verbose mode. ") . "\n" . N(" names or rpm files given on command line will be installed. "); - exit(0); + exit(1); } # Parse command line diff --git a/urpmi.addmedia b/urpmi.addmedia index acbd852a..0ef5b807 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -72,7 +72,7 @@ and [options] are from ") . N(" -v - verbose mode. "); print($m ? "$usage\n$m" : $usage); - exit 0; + exit 1; } #- remove quietly the failing media. diff --git a/urpmi.recover b/urpmi.recover index 3e9cd0af..d44ee769 100644 --- a/urpmi.recover +++ b/urpmi.recover @@ -41,7 +41,7 @@ usage: or rollback the specified number of transactions ") . N(" --disable - turn off repackaging "); - exit(0); + exit(1); } sub fmt_tid { diff --git a/urpmi.removemedia b/urpmi.removemedia index b60c1f55..88e9a823 100755 --- a/urpmi.removemedia +++ b/urpmi.removemedia @@ -45,7 +45,7 @@ where is a medium name to remove. ") . N(" -v - verbose mode. ") . N(" --urpmi-root - use another root for urpmi db & rpm installation. ") . $msg; - exit 0; + exit 1; } diff --git a/urpmi.update b/urpmi.update index 8b72aaee..9d6357e2 100755 --- a/urpmi.update +++ b/urpmi.update @@ -52,7 +52,7 @@ where is a medium name to update. ") . N(" -q - quiet mode. ") . N(" -v - verbose mode. "); - exit 0; + exit 1; } $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"; diff --git a/urpmq b/urpmq index eb66e9b4..453f0d9f 100755 --- a/urpmq +++ b/urpmq @@ -101,7 +101,7 @@ usage: ") . N(" -Y - like -y, but forces to match case-insensitively. ") . "\n" . N(" names or rpm files given on command line are queried. "); - exit(0); + exit(1); } sub escape_shell ($) { -- cgit v1.2.1