diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-26 09:26:37 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-26 09:26:37 +0000 |
commit | a118299b080063c73f0fd80318889aa4079f3e32 (patch) | |
tree | c7268fa96065aff0caab357828cea81dcd1bfee9 | |
parent | a6cd600030eb6820c41ca80d063664f708b434c6 (diff) | |
download | urpmi-a118299b080063c73f0fd80318889aa4079f3e32.tar urpmi-a118299b080063c73f0fd80318889aa4079f3e32.tar.gz urpmi-a118299b080063c73f0fd80318889aa4079f3e32.tar.bz2 urpmi-a118299b080063c73f0fd80318889aa4079f3e32.tar.xz urpmi-a118299b080063c73f0fd80318889aa4079f3e32.zip |
Make the --probe-synthesis option compatible with --distrib in
urpmi.addmedia.
-rw-r--r-- | urpm.pm | 2 | ||||
-rwxr-xr-x | urpmi.addmedia | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -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 <relative path of hdlist> 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); |