summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
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 /urpmi.addmedia
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 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia10
1 files changed, 8 insertions, 2 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 5355a877..dcc030e2 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -148,12 +148,13 @@ and [options] are from
};
$@ and $urpm->{log}(_("...retrieving failed: %s", $@));
#- examine its contents and create all requested media, url is now a simple regex.
- my $heading = quotemeta($options{version} eq 'cooker' ? 'cooker' : $options{distrib});
+ my $heading = quotemeta($options{distrib});
my $qarch = quotemeta($options{arch});
my $i = 1;
local *F;
open F, "$urpm->{cachedir}/partial/$basename";
while (<F>) {
+ 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+(.*))?$/) {
@@ -162,7 +163,12 @@ and [options] are from
} elsif (($a, $burl) = /^$heading([^:]*):(\S*)$/) {
$a eq $options{arch} or next;
$options{distrib} eq 'updates' and $burl = "$burl/$options{version}/RPMS";
- $options{distrib} eq 'contrib' and $burl = $burl."2";
+ $options{distrib} eq 'contrib' and $burl .= "2";
+ } elsif (($a, $burl) = /^cooker([^:]*):(\S*)$/) {
+ #- specific case for old style mirrors file description (of Mandrake).
+ $options{version} eq 'cooker' && $options{distrib} eq 'contrib' or next;
+ $a eq $options{arch} or next;
+ $burl .= "2";
} else {
# it could a blank line (from a commentary) or source description.
next;