From 6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 30 Sep 2002 12:20:30 +0000 Subject: added possible fix for noauto: flag of hdlist not generating good list file. --- perl-install/install_any.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'perl-install/install_any.pm') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 04f3279a0..e20e1cdf7 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -599,10 +599,20 @@ sub install_urpmi { readlink "/tmp/image/Mandrake" =~ m,^(\/.*)\/Mandrake\/*$, && "removable:/$1") . "/$_->{rpmsdir}"; #- build list file using internal data, synthesis file should exists. - #- WARNING this method of build only works because synthesis (or hdlist) - #- has been read. - foreach (@{$packages->{depslist}}[$_->{start} .. $_->{end}]) { - print LIST "$dir/".$_->filename."\n"; + if ($_->{end} > $_->{start}) { + #- WARNING this method of build only works because synthesis (or hdlist) + #- has been read. + foreach (@{$packages->{depslist}}[$_->{start} .. $_->{end}]) { + print LIST "$dir/".$_->filename."\n"; + } + } else { + #- need to use another method here to build synthesis. + local (*F, $_); + open F, "parsehdlist '$prefix/var/lib/urpmi/hdlist.$name.cz' |"; + while ($_ = ) { + print LIST "$dir/$_"; + } + close F; } close LIST; -- cgit v1.2.1