From 2ba39a4004d05980a0a25580e3171fbe5bf6471fb27d31460b64c5f8038422cb Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 14 Jan 2011 13:47:47 +0000 Subject: [PATCH] Accepting request 58184 from Base:System Accepted submit request 58184 from user coolo OBS-URL: https://build.opensuse.org/request/show/58184 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=119 --- remove-translations.diff | 20 ++++++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 7 ++++--- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 remove-translations.diff diff --git a/remove-translations.diff b/remove-translations.diff new file mode 100644 index 0000000..8a95025 --- /dev/null +++ b/remove-translations.diff @@ -0,0 +1,20 @@ +--- scripts/find-lang.sh 2011-01-13 13:44:01.000000000 +0100 ++++ scripts/find-lang.sh 2011-01-13 13:44:39.770439219 +0100 +@@ -122,6 +122,17 @@ fi + MO_NAME_NEW=$MO_NAME.tmp.$$ + rm -f $MO_NAME_NEW + ++# remove languages we do not yet support - but give out statistics ++find $TOP_DIR/usr/share/locale/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/locale/'::; /^$/d' | while read dir; do ++ if ! rpm -ql filesystem | egrep -q "/usr/share/locale/$dir"$; then ++ find $TOP_DIR/usr/share/locale/$dir -name *.mo | sed 's:'"$TOP_DIR"'::' | while read file; do ++ echo -n "removing translation $file: " ++ msgunfmt "$TOP_DIR/$file" | msgfmt --statistics -o /dev/null - ++ done ++ rm -rf $TOP_DIR/usr/share/locale/$dir ++ fi ++done ++ + find $TOP_DIR -type f -o -type l|sed ' + s:'"$TOP_DIR"':: + '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: diff --git a/rpm.changes b/rpm.changes index b64c643..79c86f6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 14 08:58:40 UTC 2011 - coolo@novell.com + +- let %find_lang remove (with a comment) languages not supported. + Supported languages are in filesystem.rpm's file list (bnc#659001) + ------------------------------------------------------------------- Mon Dec 20 11:50:55 CET 2010 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index bb771bc..c852773 100644 --- a/rpm.spec +++ b/rpm.spec @@ -119,6 +119,7 @@ Patch81: pkgconfig-0.24.diff Patch82: rpm-gst-provides.patch Patch83: langnoc.diff Patch84: initscriptsprov.diff +Patch85: remove-translations.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -180,7 +181,7 @@ rm -f rpmdb/db.h %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 -P 82 -P 83 +%patch -P 80 -P 81 -P 82 -P 83 -P 85 %patch84 -p1 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms @@ -282,6 +283,7 @@ popd gzip -9 CHANGES rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm %clean rm -rf $RPM_BUILD_ROOT @@ -306,7 +308,7 @@ fi %verifyscript %verify_permissions -f /usr/lib/rpm/permlist -%files +%files -f rpm.lang %defattr(-,root,root) %doc CHANGES.gz COPYING GROUPS %doc doc/manual @@ -321,7 +323,6 @@ fi %{_libdir}/librpmbuild.so.* %{_libdir}/librpmio.so.* %doc %{_mandir}/man[18]/*.[18]* - /usr/share/locale/*/LC_MESSAGES/rpm.mo %dir /var/lib/rpm %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS