summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-09-30 12:20:30 +0000
committerFrancois Pons <fpons@mandriva.com>2002-09-30 12:20:30 +0000
commit6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de (patch)
treebb55995d1c0c1f6d679b58ca20c54bf2a717d2ed /perl-install/install_any.pm
parent9018f81f57ff1b7ba1dd8e98e7c4b07d48e6f26c (diff)
downloaddrakx-6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de.tar
drakx-6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de.tar.gz
drakx-6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de.tar.bz2
drakx-6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de.tar.xz
drakx-6cab0b39c6ebf85e6e776c1b6c689e8e7eaf63de.zip
added possible fix for noauto: flag of hdlist not generating good list file.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm18
1 files changed, 14 insertions, 4 deletions
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 ($_ = <F>) {
+ print LIST "$dir/$_";
+ }
+ close F;
}
close LIST;