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. --- urpm.pm | 2 +- urpmi.addmedia | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/urpm.pm b/urpm.pm index fcec839d..e9562e12 100644 --- a/urpm.pm +++ b/urpm.pm @@ -730,7 +730,7 @@ sub add_distrib_media { $urpm->add_medium( $name ? "$descr ($name$medium)" : $descr, "$url/$rpmsdir", - offset_pathname($url, $rpmsdir) . "/$distrib_root/$hdlist", + offset_pathname($url, $rpmsdir) . "/$distrib_root/" . ($options{probe_with} eq 'synthesis' ? 'synthesis.' : '') . $hdlist, index_name => 0, %options, ); 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