Accepting request 58118 from home:coolo:branches:openSUSE:Factory

reviewed by mls

OBS-URL: https://build.opensuse.org/request/show/58118
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=85
This commit is contained in:
Stephan Kulow 2011-01-14 13:07:20 +00:00 committed by Git OBS Bridge
parent 37d7ba7e6d
commit 9b51957650
3 changed files with 30 additions and 3 deletions

20
remove-translations.diff Normal file
View File

@ -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:

View File

@ -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

View File

@ -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