summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-12-06 17:50:21 +0000
committerFrancois Pons <fpons@mandriva.com>2002-12-06 17:50:21 +0000
commit7be51dd4d6821506760245095f92534494da893d (patch)
treeb70b4ef9f057ed689861fccee26ed7d657b6609b /urpm.pm
parent60d4ad6c90817f674088bf32302c575b7b5129f2 (diff)
downloadurpmi-7be51dd4d6821506760245095f92534494da893d.tar
urpmi-7be51dd4d6821506760245095f92534494da893d.tar.gz
urpmi-7be51dd4d6821506760245095f92534494da893d.tar.bz2
urpmi-7be51dd4d6821506760245095f92534494da893d.tar.xz
urpmi-7be51dd4d6821506760245095f92534494da893d.zip
4.1-10mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 939f7292..37433399 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -225,7 +225,7 @@ sub sync_wget {
my $options = shift @_;
system "/usr/bin/wget",
(ref $options && set_proxy({type => "wget", proxy => $options->{proxy}})),
- (ref $options && $options->{quiet} ? ("-q") : ()), "-NP",
+ (ref $options && $options->{quiet} ? ("-q") : ("-nv")), "-NP",
(ref $options ? $options->{dir} : $options), @_;
$? == 0 or die _("wget failed: exited with %d or signal %d\n", $? >> 8, $? & 127);
}
@@ -672,8 +672,20 @@ sub add_medium {
#- if a medium with that name has already been found
#- we have to exit now
my ($medium);
- foreach (@{$urpm->{media}}) {
- $_->{name} eq $name and $medium = $_;
+ if (defined $options{index_name}) {
+ my $i = $options{index_name};
+ do {
+ ++$i;
+ undef $medium;
+ foreach (@{$urpm->{media}}) {
+ $_->{name} eq $name.$i and $medium = $_;
+ }
+ } while ($medium);
+ $name .= $i;
+ } else {
+ foreach (@{$urpm->{media}}) {
+ $_->{name} eq $name and $medium = $_;
+ }
}
$medium and $urpm->{fatal}(5, _("medium \"%s\" already exists", $medium->{name}));