From afd8ef85ed3f30e34296f30ce8760bbea60a4719 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 23 Jun 2008 13:01:50 +0000 Subject: 1.82: find-lang.pl: do not own /usr/share/locales/$lang/LC_MESSAGES to speed-up rpm Things owned a lot of times is a pathological case in rpm. For example, if you remove file list from poedit, it will install/uninstall much faster (3x faster for both cold start and warm start on a test on my box) --- configure.ac | 2 +- find-lang.pl | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d8ace46..ab6548a 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # $Id$ AC_PREREQ(2.59) -AC_INIT(rpm-mandriva-setup, 1.81, nanardon@mandriva.org) +AC_INIT(rpm-mandriva-setup, 1.82, nanardon@mandriva.org) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.9) AC_CONFIG_SRCDIR diff --git a/find-lang.pl b/find-lang.pl index 9b9c7a4..249125d 100644 --- a/find-lang.pl +++ b/find-lang.pl @@ -43,7 +43,7 @@ File::Find::find( } my ($pkg, $lang, $parent, $langfile) = ($4, $3, $2, $1); if (pkg_match($pkg)) { - parent_to_own($langfile, $file, $lang); + own_file($file, $lang); } } elsif ($file =~ m:^((.*/gnome/help)/([^/]+)/([^/]+)).*:) { if (!$withgnome) { @@ -115,6 +115,11 @@ sub pkg_match { return; } +sub own_file { + my ($file, $lang) = @_; + $finallist{$file}{'lang'}{$lang} = 1; +} + sub parent_to_own { my ($parent, $file, $lang) = @_; debug("parent_to_own: $parent, $file, $lang"); @@ -135,7 +140,7 @@ sub parent_to_own { $finallist{$parent}{'lang'}{$lang} = 1; debug("Parent %s will be %s", $parent, $lang); } - $finallist{$file}{'lang'}{$lang} = 1; + own_file($file, $lang); debug("Parent %s will be %s", $file, $lang); } -- cgit v1.2.1