summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-03 16:06:19 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-03 16:06:19 +0000
commitc451c2ba4d5470ba3eb838a8096c52f7e96e9189 (patch)
treef627c4a10b312890e6e00c04a701073987f7af7c /perl-install
parent51c62f928f9d8810b67f8703f8a85d60a91f3801 (diff)
downloaddrakx-c451c2ba4d5470ba3eb838a8096c52f7e96e9189.tar
drakx-c451c2ba4d5470ba3eb838a8096c52f7e96e9189.tar.gz
drakx-c451c2ba4d5470ba3eb838a8096c52f7e96e9189.tar.bz2
drakx-c451c2ba4d5470ba3eb838a8096c52f7e96e9189.tar.xz
drakx-c451c2ba4d5470ba3eb838a8096c52f7e96e9189.zip
updated code to create synthesis file (including provides on files).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 6ae42c8a7..f5fa3ddf9 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -520,13 +520,6 @@ sub install_urpmi {
my @cfg = map_index {
my $name = $_->{fakemedium};
- #- build synthesis file at install, this will improve performance greatly.
- run_program::rooted($prefix, "parsehdlist", ">", "/var/lib/urpmi/synthesis.hdlist.$name",
- "--compact", "--name", "--provides", "--requires", "/var/lib/urpmi/hdlist.$name.cz");
- run_program::rooted($prefix, "gzip", "-S", ".cz", "/var/lib/urpmi/synthesis.hdlist.$name");
- #- safe guard correct generation of synthesis file.
- -s "$prefix/var/lib/urpmi/synthesis.hdlist.$name.cz" > 24 or unlink "$prefix/var/lib/urpmi/synthesis.hdlist.$name.cz";
-
local *LIST;
my $mask = umask 077;
open LIST, ">$prefix/var/lib/urpmi/list.$name" or log::l("failed to write list.$name");
@@ -536,7 +529,7 @@ sub install_urpmi {
disk => "file:/" . hdInstallPath(),
ftp => $ENV{URLPREFIX},
http => $ENV{URLPREFIX},
- cdrom => "removable_cdrom://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";
+ cdrom => "removable://mnt/cdrom" }}{$method} . "/$_->{rpmsdir}";
local *FILES; open FILES, "$ENV{LD_LOADER} parsehdlist /tmp/$_->{hdlist} |";
print LIST "$dir/$_\n" foreach chomp_(<FILES>);
@@ -550,13 +543,16 @@ sub install_urpmi {
"$qname " . ($dir !~ /^(ftp|http)/ && $qdir) . " {
hdlist: hdlist.$name.cz
with_hdlist: ../base/$_->{hdlist}
- list: list.$name" . ($dir =~ /removable_([^\s:_]*)/ && "
- removable: /dev/$1") . "
+ list: list.$name" . ($dir =~ /removable:/ && "
+ removable: /dev/cdrom") . "
}
";
} 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');
}