summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpme2
-rwxr-xr-xurpmf4
-rwxr-xr-xurpmi.addmedia2
-rwxr-xr-xurpmi.update4
-rwxr-xr-xurpmq2
5 files changed, 7 insertions, 7 deletions
diff --git a/urpme b/urpme
index 9d226c0d..16c249d5 100644
--- a/urpme
+++ b/urpme
@@ -57,7 +57,7 @@ usage:
@ARGV or usage;
my @origARGV = @ARGV;
-urpm::args::parse_cmdline();
+urpm::args::parse_cmdline() or exit(1);
@l = @ARGV;
my $urpm = new urpm;
diff --git a/urpmf b/urpmf
index ed9d218b..2799f9de 100755
--- a/urpmf
+++ b/urpmf
@@ -101,7 +101,7 @@ our $expr; # regexp to match against
our %uniq;
#- parse arguments list.
-urpm::args::parse_cmdline();
+urpm::args::parse_cmdline() or exit(1);
if ($qf eq '%default') {
#- nothing on the command-line : default is to search on file names
@@ -166,7 +166,7 @@ $urpm->{error}("qf:[$qf]\ncallback:\n$callback") if our $debug;
$callback = eval $callback;
if ($@) {
$debug and warn "Internal error: $@\n";
- usage;
+ exit(1);
}
if ($env) {
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 12bb35b3..0bf45383 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -98,7 +98,7 @@ $options{force} = 0;
$options{noclean} = 1;
$options{verbose} = 1;
my $urpm = new urpm;
-urpm::args::parse_cmdline(urpm => $urpm);
+urpm::args::parse_cmdline(urpm => $urpm) or usage;
#- the default is to probe a synthesis file, except for --distrib
$options{probe_with} = 'synthesis' unless $options{distrib} || exists($options{probe_with});
our ($name, $url, $with, $relative_hdlist) = our @cmdline;
diff --git a/urpmi.update b/urpmi.update
index 3bda128b..14bd5ee1 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 MandrakeSoft SA
-#- Copyright (C) 2005 Mandriva SA
+#- Copyright (C) 2005, 2006 Mandriva SA
#-
#- This program is free software; you can redistribute it and/or modify
#- it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ my $urpm = new urpm;
$options{force} = 0;
$options{noclean} = $options{verbose} = 1;
-urpm::args::parse_cmdline(urpm => $urpm);
+urpm::args::parse_cmdline(urpm => $urpm) or exit(1);
$options{verbose} > 0 or $urpm->{log} = sub {};
diff --git a/urpmq b/urpmq
index d58d38ab..012d72df 100755
--- a/urpmq
+++ b/urpmq
@@ -109,7 +109,7 @@ sub escape_shell ($) {
#- parse arguments list.
@ARGV or usage;
my $urpm = new urpm;
-urpm::args::parse_cmdline(urpm => $urpm);
+urpm::args::parse_cmdline(urpm => $urpm) or exit(1);
#- remove verbose if not asked.
$urpm::args::options{verbose} or $urpm->{log} = sub {};