diff options
author | Francois Pons <fpons@mandriva.com> | 2001-09-03 12:38:48 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-09-03 12:38:48 +0000 |
commit | 086e7a2c52a466b408aa2673227d009bf2766611 (patch) | |
tree | d52fdc1f840e3798523f7a618b3ba91787492be7 | |
parent | a384dec9ada016af7631ecb2b29bd972045dc9b2 (diff) | |
download | drakx-backup-do-not-use-086e7a2c52a466b408aa2673227d009bf2766611.tar drakx-backup-do-not-use-086e7a2c52a466b408aa2673227d009bf2766611.tar.gz drakx-backup-do-not-use-086e7a2c52a466b408aa2673227d009bf2766611.tar.bz2 drakx-backup-do-not-use-086e7a2c52a466b408aa2673227d009bf2766611.tar.xz drakx-backup-do-not-use-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).
-rw-r--r-- | perl-install/install_any.pm | 17 |
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 }; } |