From 3d1e5919b28e63bd9a90aef4aafba1b9bded4a65 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 29 Nov 2006 17:34:59 +0000 Subject: instead of displaying usage, say what's wrong --- urpmi.addmedia | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'urpmi.addmedia') 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 (for local directory, the path must be absolute)\n"); if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to add media")); -- cgit v1.2.1