summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-09-03 12:38:48 +0000
committerFrancois Pons <fpons@mandriva.com>2001-09-03 12:38:48 +0000
commit086e7a2c52a466b408aa2673227d009bf2766611 (patch)
treed52fdc1f840e3798523f7a618b3ba91787492be7 /perl-install
parenta384dec9ada016af7631ecb2b29bd972045dc9b2 (diff)
downloaddrakx-086e7a2c52a466b408aa2673227d009bf2766611.tar
drakx-086e7a2c52a466b408aa2673227d009bf2766611.tar.gz
drakx-086e7a2c52a466b408aa2673227d009bf2766611.tar.bz2
drakx-086e7a2c52a466b408aa2673227d009bf2766611.tar.xz
drakx-086e7a2c52a466b408aa2673227d009bf2766611.zip
updated to use new urpmi.cfg format for install_urpmi, make sure the directory
is not given for ftp and http install ($dir).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index d7587d20c..3ad21d605 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -531,16 +531,25 @@ sub install_urpmi {
disk => "file:/" . hdInstallPath(),
ftp => $ENV{URLPREFIX},
http => $ENV{URLPREFIX},
- cdrom => "removable_cdrom_$::i://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";
+ cdrom => "removable_cdrom://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";
local *FILES; open FILES, "$ENV{LD_LOADER} parsehdlist /tmp/$_->{hdlist} |";
print LIST "$dir/$_\n" foreach chomp_(<FILES>);
close FILES or log::l("parsehdlist failed"), return;
close LIST;
- $name =~ s/(\s)/\\$1/g; $dir =~ s/(\s)/\\$1/g; #- necessary to change protect white char, for urpmi >= 1.40
- $dir .= " with ../base/$_->{hdlist}";
- "$name $dir\n";
+ my ($qname, $qdir) = ($name, $dir);
+ $qname =~ s/(\s)/\\$1/g; $qdir =~ s/(\s)/\\$1/g;
+
+ #- output new urpmi.cfg format here.
+ "$qname " . ($dir !~ /^(ftp|http)/ && $qdir) . " {
+ hdlist: hdlist.$name.cz
+ with_hdlist: ../base/$_->{hdlist}
+ list: list.$name" . ($dir =~ /removable_([^\s:_]*)/ && "
+ removable: /dev/$1") . "
+}
+
+";
} values %$mediums;
eval { output "$prefix/etc/urpmi/urpmi.cfg", @cfg };
}