From 9212dd72ed063ba976b9776820a0051c8cba3928 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 22 Jan 2002 16:11:19 +0000 Subject: changed code to build synthesis file, check if they have not already been copied from mirror, or build them using parsehdlist. --- perl-install/install_any.pm | 10 +++++++--- 1 file 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'); } -- cgit v1.2.1