From f1c293fc4ac466d853c1ca95f477bd9cd25f1342 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 28 Mar 2008 10:34:20 +0000 Subject: drop 'with' parameter, it didn't work properly anymore (Anssi) --- gurpmi.addmedia | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'gurpmi.addmedia') diff --git a/gurpmi.addmedia b/gurpmi.addmedia index 3ebd472d..77b09361 100755 --- a/gurpmi.addmedia +++ b/gurpmi.addmedia @@ -81,21 +81,15 @@ my @addmedia_args; my @names; while (@ARGV) { - my ($name, $url, $with, $with_hdlist) = @ARGV; - $with eq 'with' or ($with, $with_hdlist) = (undef, undef); + my ($name, $url) = @ARGV; if ($url !~ m,^(([^:]*):/)?/,) { interactive_msg('gurpmi.addmedia', N("bad (for local directory, the path must be absolute)") . "\n\n$url"); myexit(-1); } - if ($with && !$with_hdlist) { - interactive_msg('gurpmi.addmedia', - N("Unable to add medium, wrong or missing arguments")); - myexit(-1); - } - push @addmedia_args, [ $name, $url, $with, $with_hdlist ]; + push @addmedia_args, [ $name, $url ]; push @names, $name; - shift @ARGV foreach 1 .. ($with ? 4 : 2); + shift @ARGV foreach 1 .. 2; } $fromfile and do { @@ -120,10 +114,10 @@ foreach (@addmedia_args) { #- NB: that short circuits $success = $success && add_medium_and_check( $urpm, - { probe_with => !$_->[2], distrib => $distrib }, + { distrib => $distrib }, $_->[0], $_->[1], - if_(!$distrib, $_->[3]), + if_(!$distrib, undef), if_($update, update => $update), ); } -- cgit v1.2.1