From a118299b080063c73f0fd80318889aa4079f3e32 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 26 Aug 2004 09:26:37 +0000 Subject: Make the --probe-synthesis option compatible with --distrib in urpmi.addmedia. --- urpmi.addmedia | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'urpmi.addmedia') diff --git a/urpmi.addmedia b/urpmi.addmedia index b91de7b2..e02d528b 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -99,15 +99,15 @@ sub main { $options{force} = 0; $options{noclean} = 1; $options{verbose} = 1; - $options{probe_with} = 'synthesis'; #- no the default is to probe synthesis file. my $urpm = new urpm; urpm::args::parse_cmdline(urpm => $urpm); + #- the default is to probe a synthesis file, except for --distrib + $options{probe_with} = 'synthesis' unless exists($options{distrib}) || exists($options{probe_with}); our ($name, $url, $with, $relative_hdlist) = our @cmdline; #- remove verbose if not asked. $options{verbose} > 0 or $urpm->{log} = sub {}; - #- allow not to give name immediately. $options{distrib} or $url or ($url, $name) = ($name, ''); my ($type) = $url =~ m,^(([^:]*):/)?/, or $options{distrib} or usage; @@ -205,7 +205,7 @@ sub main { $with || $relative_hdlist and usage N("no need to give with --distrib"); - $urpm->add_distrib_media($name, $url, virtual => $options{virtual}, update => $options{update}); + $urpm->add_distrib_media($name, $url, virtual => $options{virtual}, update => $options{update}, probe_with => $options{probe_with}); } $urpm->update_media(%options, callback => \&urpm::download::sync_logger); -- cgit v1.2.1