summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-12-02 15:45:56 +0000
committerFrancois Pons <fpons@mandriva.com>2002-12-02 15:45:56 +0000
commitb2e54a124a9f0e2c5660acf8ddf5b0c53ef58436 (patch)
tree696a3a3d1f8446abf86acc5aa71c673b463eaa91 /urpm.pm
parent7133e5ec5350f3a79f5ea0ba25136e01837cec10 (diff)
downloadurpmi-b2e54a124a9f0e2c5660acf8ddf5b0c53ef58436.tar
urpmi-b2e54a124a9f0e2c5660acf8ddf5b0c53ef58436.tar.gz
urpmi-b2e54a124a9f0e2c5660acf8ddf5b0c53ef58436.tar.bz2
urpmi-b2e54a124a9f0e2c5660acf8ddf5b0c53ef58436.tar.xz
urpmi-b2e54a124a9f0e2c5660acf8ddf5b0c53ef58436.zip
4.1-6mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm23
1 files changed, 13 insertions, 10 deletions
diff --git a/urpm.pm b/urpm.pm
index d4404bb5..26acd13a 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -375,9 +375,11 @@ sub read_config {
exists $hdlists{$_->{hdlist}} and
$_->{ignore} = 1, $urpm->{error}(_("medium \"%s\" trying to use an already used hdlist, medium ignored", $_->{name}));
$hdlists{$_->{hdlist}} = undef;
- exists $lists{$_->{list}} and
- $_->{ignore} = 1, $urpm->{error}(_("medium \"%s\" trying to use an already used list, medium ignored", $_->{name}));
- $lists{$_->{list}} = undef;
+ if ($_->{list}) {
+ exists $lists{$_->{list}} and
+ $_->{ignore} = 1, $urpm->{error}(_("medium \"%s\" trying to use an already used list, medium ignored", $_->{name}));
+ $lists{$_->{list}} = undef;
+ }
}
#- urpmi.cfg if old is not enough to known the various media, track
@@ -444,18 +446,16 @@ sub probe_medium {
$medium->{ignore} = 1, $urpm->{error}(_("unable to find hdlist file for \"%s\", medium ignored", $medium->{name}));
}
unless ($medium->{ignore} || $medium->{list}) {
- $medium->{list} = "list.$medium->{name}";
- unless (-e "$urpm->{statedir}/$medium->{list}") {
- if (defined $medium->{clear_url}) {
- delete $medium->{list};
- } else {
+ unless (defined $medium->{url}) {
+ $medium->{list} = "list.$medium->{name}";
+ unless (-e "$urpm->{statedir}/$medium->{list}") {
$medium->{ignore} = 1, $urpm->{error}(_("unable to find list file for \"%s\", medium ignored", $medium->{name}));
}
}
}
#- there is a little more to do at this point as url is not known, inspect directly list file for it.
- unless ($medium->{url} || $medium->{clear_url}) {
+ unless ($medium->{url}) {
my %probe;
local *L;
open L, "$urpm->{statedir}/$medium->{list}";
@@ -1268,6 +1268,7 @@ sub update_media {
} else {
#- the flag is no more necessary.
delete $medium->{list};
+ unlink "$urpm->{statedir}/$medium->{list}";
}
}
}
@@ -1291,7 +1292,7 @@ sub update_media {
#- but use newly created file.
unlink "$urpm->{statedir}/$medium->{hdlist}";
$medium->{synthesis} and unlink "$urpm->{statedir}/synthesis.$medium->{hdlist}";
- unlink "$urpm->{statedir}/$medium->{list}";
+ $medium->{list} and unlink "$urpm->{statedir}/$medium->{list}";
unless ($medium->{headers}) {
rename("$urpm->{cachedir}/partial/$medium->{hdlist}", $medium->{synthesis} ?
"$urpm->{statedir}/synthesis.$medium->{hdlist}" : "$urpm->{statedir}/$medium->{hdlist}") or
@@ -1857,6 +1858,8 @@ sub get_source_packages {
my %sources;
unless ($medium->{ignore}) {
+ print STDERR ">>$medium->{$_}\n" foreach qw(name list url start end);
+ print STDERR "\n";
#- always prefer a list file is available.
if ($medium->{list} && -r "$urpm->{statedir}/$medium->{list}") {
open F, "$urpm->{statedir}/$medium->{list}";