]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- small speedup for find_lang when invoked dozens of times (fe kdemodule-i18n)
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 29 May 2006 06:47:19 +0000 (06:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-find_lang.patch -> 1.1

rpm-find_lang.patch [new file with mode: 0644]

diff --git a/rpm-find_lang.patch b/rpm-find_lang.patch
new file mode 100644 (file)
index 0000000..66bed7c
--- /dev/null
@@ -0,0 +1,36 @@
+--- rpm-4.4.2/scripts/find-lang.sh     2006-05-29 09:45:00.684999558 +0300
++++ /usr/lib/rpm/find-lang.sh  2006-05-28 21:11:34.132617298 +0300
+@@ -97,7 +97,11 @@
+ echo '%defattr(644,root,root,755)' > $MO_NAME
+-find $TOP_DIR -type f -name \*.mo | xargs -r file | egrep -v ', 1 messages$' |\
++if [ ! -f find_lang.mo.cache ]; then
++    find $TOP_DIR -type f -name \*.mo > find_lang.mo.cache
++fi
++
++cat find_lang.mo.cache | xargs -r file | egrep -v ', 1 messages$' |\
+ sed '
+ s/:.*//
+ s:'"$TOP_DIR"'::
+@@ -107,7 +111,10 @@
+ s:%lang(C) ::
+ s:^\$::' | egrep -v '^$' >> $MO_NAME
+-find $TOP_DIR -type d|sed '
++if [ ! -f find_lang.dir.cache ]; then
++    find $TOP_DIR -type d > find_lang.dir.cache
++fi
++cat find_lang.dir.cache | sed '
+ s:'"$TOP_DIR"'::
+ '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1:
+ '"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\)::
+@@ -119,7 +126,7 @@
+ s:^\([^%].*\)::
+ s:%lang(C) ::' | egrep -v '^$' >> $MO_NAME
+-find $TOP_DIR -type d|sed '
++cat find_lang.dir.cache | sed '
+ s:'"$TOP_DIR"'::
+ '"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\)::
+ '"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
This page took 0.041859 seconds and 4 git commands to generate.