diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-06-23 13:01:50 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-06-23 13:01:50 +0000 |
commit | afd8ef85ed3f30e34296f30ce8760bbea60a4719 (patch) | |
tree | 2521c84976d2c6eb584d0b782f61595a610b9d6f | |
parent | 53b312bc4fed675be809203e8864a93edcb32e06 (diff) | |
download | rpm-setup-afd8ef85ed3f30e34296f30ce8760bbea60a4719.tar rpm-setup-afd8ef85ed3f30e34296f30ce8760bbea60a4719.tar.gz rpm-setup-afd8ef85ed3f30e34296f30ce8760bbea60a4719.tar.bz2 rpm-setup-afd8ef85ed3f30e34296f30ce8760bbea60a4719.tar.xz rpm-setup-afd8ef85ed3f30e34296f30ce8760bbea60a4719.zip |
1.82: find-lang.pl: do not own /usr/share/locales/$lang/LC_MESSAGES to speed-up rpm1.82
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)
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | 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); } |