summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-22 16:11:19 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-22 16:11:19 +0000
commit9212dd72ed063ba976b9776820a0051c8cba3928 (patch)
tree7d84e6aa99e8b488cccfea74a1042c213ace88c9 /perl-install
parente92fcfaefdb757ae3d60aac81bd631cf47ade347 (diff)
downloaddrakx-backup-do-not-use-9212dd72ed063ba976b9776820a0051c8cba3928.tar
drakx-backup-do-not-use-9212dd72ed063ba976b9776820a0051c8cba3928.tar.gz
drakx-backup-do-not-use-9212dd72ed063ba976b9776820a0051c8cba3928.tar.bz2
drakx-backup-do-not-use-9212dd72ed063ba976b9776820a0051c8cba3928.tar.xz
drakx-backup-do-not-use-9212dd72ed063ba976b9776820a0051c8cba3928.zip
changed code to build synthesis file, check if they have not already been copied
from mirror, or build them using parsehdlist.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 7e8807b8d..b4b6f75e7 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -550,6 +550,13 @@ sub install_urpmi {
close FILES or log::l("parsehdlist failed"), return;
close LIST;
+ #- build synthesis file if there are still not existing (ie not copied from mirror).
+ if (-s "$prefix/var/lib/urpmi/synthesis.$name.cz" > 32) {
+ run_program::rooted($prefix, "parsehdlist", ">", "/var/lib/urpmi/synthesis.hdlist.$name",
+ "--synthesis", "/var/lib/urpmi/hdlist.$name.cz");
+ run_program::rooted($prefix, "gzip", "-S", ".cz", "/var/lib/urpmi/synthesis.hdlist.$name");
+ }
+
my ($qname, $qdir) = ($name, $dir);
$qname =~ s/(\s)/\\$1/g; $qdir =~ s/(\s)/\\$1/g;
@@ -565,9 +572,6 @@ sub install_urpmi {
";
} sort { $a->{medium} <=> $b->{medium} } values %$mediums;
eval { output "$prefix/etc/urpmi/urpmi.cfg", @cfg };
-
- #- automatically build all synthesis files.
- run_program::rooted($prefix, "perl", "-e", 'use urpm; $urpm = new urpm; $urpm->read_config; $urpm->update_media');
}