From 7be51dd4d6821506760245095f92534494da893d Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 6 Dec 2002 17:50:21 +0000 Subject: 4.1-10mdk --- urpm.pm | 18 +++++++++++++++--- urpmi.addmedia | 5 +---- urpmi.spec | 6 +++++- 3 files changed, 21 insertions(+), 8 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})); diff --git a/urpmi.addmedia b/urpmi.addmedia index 7569c745..29d1aba8 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -151,11 +151,9 @@ and [options] are from #- examine its contents and create all requested media, url is now a simple regex. my $heading = quotemeta($options{distrib}); my $qarch = quotemeta($options{arch}); - my $i = 1; local *F; open F, "$urpm->{cachedir}/partial/$basename"; while () { - print STDERR ">>>$_\n" if chomp; s/#.*$//; s/^\s*//; s/\s*$//; my ($v, $a, $l, $burl, $relative_hdlist); if (($v, $a, $l, $burl, $relative_hdlist) = /^$heading:([^:]*):([^:]*):([^:]*):(\S*)(?:\s+with\s+(.*))?$/) { @@ -176,8 +174,7 @@ and [options] are from } #- sort according to url or location if possible. !$url || $l && $l =~ /$url/i || $burl =~ /$url/i or next; - $urpm->add_medium("$name$i", $burl, $relative_hdlist, update => $options{update}); - ++$i; + $urpm->add_medium($name, $burl, $relative_hdlist, update => $options{update}, index_name => 0); } close F; } else { diff --git a/urpmi.spec b/urpmi.spec index 3e71e689..7984c94f 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -2,7 +2,7 @@ Name: urpmi Version: 4.1 -Release: 9mdk +Release: 10mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -204,6 +204,10 @@ fi %changelog +* Fri Dec 6 2002 François Pons 4.1-10mdk +- fixed indexation when using --distrib-XXX for urpmi.addmedia. +- fixed wget output to be far more quietly. + * Fri Dec 6 2002 François Pons 4.1-9mdk - improved urpmf from sh to perl, now a lot of options and support of synthesis only media. -- cgit v1.2.1