From 086e7a2c52a466b408aa2673227d009bf2766611 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 3 Sep 2001 12:38:48 +0000 Subject: updated to use new urpmi.cfg format for install_urpmi, make sure the directory is not given for ftp and http install ($dir). --- perl-install/install_any.pm | 17 +++++++++++++---- 1 file 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_(); 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 }; } -- cgit v1.2.1