summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-13 16:31:49 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-13 16:31:49 +0000
commit1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56 (patch)
tree25149a4fdbf6ca9edd869b3b533bc19514118abe /perl-install/install_any.pm
parentb9484b4f1956b8bb891dd08d75b775f3cb0846f8 (diff)
downloaddrakx-backup-do-not-use-1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56.tar
drakx-backup-do-not-use-1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56.tar.gz
drakx-backup-do-not-use-1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56.tar.bz2
drakx-backup-do-not-use-1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56.tar.xz
drakx-backup-do-not-use-1dd6a4fbf577b7ccd12795d29bd70ca5ff8b5d56.zip
generate a list file if a macro is used (and only in this case).
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 630b19945..8c3978930 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -506,7 +506,7 @@ sub install_urpmi {
cdrom => "removable://mnt/cdrom" }}{$method} ||
#- for live_update or live_install script.
readlink("/tmp/image/Mandrake") =~ m,^(/.*)/Mandrake/*$, && "removable:/$1") . "/$_->{rpmsdir}";
- my $need_list = $dir =~ m|^[^:]*://[^/:\@]*:[^/:\@]+\@|; #- use list file only if a password is visible
+ my $need_list = $dir =~ m,^(?:[^:]*://[^/:\@]*:[^/:\@]+\@|.*%{),; #- use list file only if visible password or macro.
#- build a list file if needed.
if ($need_list) {
@@ -519,14 +519,20 @@ sub install_urpmi {
#- WARNING this method of build only works because synthesis (or hdlist)
#- has been read.
foreach (@{$packages->{depslist}}[$_->{start} .. $_->{end}]) {
- print $LIST "$dir/".$_->filename."\n";
+ my $ldir = $dir;
+ my $arch = $_->arch;
+ $ldir =~ s/%{ARCH}/$arch/g;
+ print $LIST "$ldir/".$_->filename."\n";
}
} else {
#- need to use another method here to build synthesis.
open(my $F, "parsehdlist '$prefix/var/lib/urpmi/hdlist.$name.cz' |");
local $_;
while (<$F>) {
- print $LIST "$dir/$_";
+ my $ldir = $dir;
+ my $arch = $_->arch;
+ $ldir =~ s/%{ARCH}/$arch/g;
+ print $LIST "$ldir/$_";
}
close $F;
}