Accepting request 1001118 from home:AndreasStieger:branches:Base:System

- remove-translations.diff: convert deprecated egrep to grep -E
  (boo#1203092)

OBS-URL: https://build.opensuse.org/request/show/1001118
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=617
This commit is contained in:
Dirk Mueller 2022-09-12 08:12:29 +00:00 committed by Git OBS Bridge
parent 1c56193783
commit f20be0b339
2 changed files with 13 additions and 5 deletions

View File

@ -1,12 +1,14 @@
--- scripts/find-lang.sh.orig 2018-01-31 13:25:25.229266078 +0000
+++ scripts/find-lang.sh 2018-01-31 13:26:15.128133281 +0000
@@ -119,6 +119,23 @@ fi
Index: scripts/find-lang.sh
===================================================================
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -134,6 +134,23 @@ fi
MO_NAME_NEW=$MO_NAME.tmp.$$
rm -f $MO_NAME_NEW
+# remove languages we do not yet support - but give out statistics
+test -d "$TOP_DIR/usr/share/locale/" && 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
+ if ! rpm -ql filesystem | grep -E -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 -
@ -15,7 +17,7 @@
+ fi
+done
+test -d "$TOP_DIR/usr/share/help/" && find $TOP_DIR/usr/share/help/ -maxdepth 1 -type d | sed 's:'"$TOP_DIR"/usr/share/help/'::; /^$/d' | while read dir; do
+ if ! rpm -ql filesystem | egrep -q "/usr/share/help/$dir"$; then
+ if ! rpm -ql filesystem | grep -E -q "/usr/share/help/$dir"$; then
+ echo "removing help translation /usr/share/help/$dir"
+ rm -rf $TOP_DIR/usr/share/help/$dir
+ fi

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 4 10:05:12 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
- remove-translations.diff: convert deprecated egrep to grep -E
(boo#1203092)
-------------------------------------------------------------------
Thu Jul 21 16:11:22 CEST 2022 - mls@suse.de