diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-29 17:34:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-29 17:34:59 +0000 |
commit | 3d1e5919b28e63bd9a90aef4aafba1b9bded4a65 (patch) | |
tree | 78561ac1b4633c20cb85ed31b25c1be5b0e896da | |
parent | 49a69ee69bae59513dc5e855ed2340c938707f1a (diff) | |
download | urpmi-3d1e5919b28e63bd9a90aef4aafba1b9bded4a65.tar urpmi-3d1e5919b28e63bd9a90aef4aafba1b9bded4a65.tar.gz urpmi-3d1e5919b28e63bd9a90aef4aafba1b9bded4a65.tar.bz2 urpmi-3d1e5919b28e63bd9a90aef4aafba1b9bded4a65.tar.xz urpmi-3d1e5919b28e63bd9a90aef4aafba1b9bded4a65.zip |
instead of displaying usage, say what's wrong
-rwxr-xr-x | urpmi.addmedia | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia index 29fe3170..dad70f1f 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -56,6 +56,7 @@ and [options] are from ") . N(" --probe-hdlist - try to find and use hdlist file. ") . N(" --no-probe - do not try to find any synthesis or hdlist file. +") . N(" --urpmi-root - use another root for urpmi db & rpm installation. ") . N(" --distrib - automatically create all media from an installation medium. ") . N(" --interactive - with --distrib, ask confirmation for each media @@ -102,11 +103,8 @@ if ($options{mirrors_url}) { } $options{force} = 0; $options{noclean} = 1; -$options{verbose} = 1; my $urpm = new urpm; urpm::args::parse_cmdline(urpm => $urpm) or usage(); -#- the default is to probe a synthesis file, except for --distrib -$options{probe_with} = 'synthesis' if !$options{distrib} && !exists($options{probe_with}); our ($name, $url, $with, $relative_hdlist) = our @cmdline; #- remove verbose if not asked. @@ -114,7 +112,7 @@ $options{verbose} > 0 or $urpm->{log} = sub {}; $sync_logger = \&urpm::download::sync_logger if $options{verbose} > 1; $url or ($url, $name) = ($name, ''); -my ($type) = $url =~ m,^(([^:]*):/)?/, or usage(); +my ($type) = $url =~ m,^(([^:]*):/)?/, or die N("bad <url> (for local directory, the path must be absolute)\n"); if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to add media")); |