commit translation-update for openSUSE:Factory
Hello community, here is the log from the commit of package translation-update for openSUSE:Factory checked in at 2014-05-08 12:39:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/translation-update (Old) and /work/SRC/openSUSE:Factory/.translation-update.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "translation-update" Changes: -------- --- /work/SRC/openSUSE:Factory/translation-update/translation-update.changes 2014-05-02 15:11:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.translation-update.new/translation-update.changes 2014-05-08 12:39:23.000000000 +0200 @@ -1,0 +2,10 @@ +Wed May 7 21:33:42 CEST 2014 - sbrabec@suse.cz + +- Fix for empty tarballs. +- Fix translation-update-generate-lang-list.sh for "@" in locale + names. +- Rename translation-update-spec-reset-lang-list.sh and + translation-update-spec-generate-lang-list.sh to make visible its + relation to the spec file. + +------------------------------------------------------------------- Old: ---- translation-update-generate-lang-list.sh translation-update-reset-lang-list.sh New: ---- translation-update-spec-generate-lang-list.sh translation-update-spec-reset-lang-list.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ translation-update.spec ++++++ --- /var/tmp/diff_new_pack.xcWMmi/_old 2014-05-08 12:39:24.000000000 +0200 +++ /var/tmp/diff_new_pack.xcWMmi/_new 2014-05-08 12:39:24.000000000 +0200 @@ -44,9 +44,9 @@ # Reset ranslation-update.tar.bz2. Source100: reset-translation-update.sh # Strip all sub-packages from the spec file. -Source101: translation-update-reset-lang-list.sh -# Generate needed sub-packages from .build.log from "osc build". -Source102: translation-update-generate-lang-list.sh +Source101: translation-update-spec-reset-lang-list.sh +# Generate spec file with needed sub-packages from .build.log from "osc build". +Source102: translation-update-spec-generate-lang-list.sh BuildArch: noarch Summary: Translation Updates License: GPL-2.0+ @@ -913,6 +913,7 @@ done %install +mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale-langpack # First process translation-update tarball. shopt -s nullglob for PACKAGE in * ; do ++++++ translation-update-spec-generate-lang-list.sh ++++++ #!/bin/bash # Generate lang list for spec file. # Usage: # 1. sh ./translation-update-reset-lang-list.sh # 2. osc build # it will fail # 3. sh ./translation-update-generate-lang-list.sh BUILD_ROOT=/var/tmp/build-root/standard-x86_64 BUILDROOT=/home/abuild/rpmbuild/BUILDROOT LNG_LIST=$(sed -n '/Installed (but unpackaged) file(s) found:/,$s:.* */usr/share/locale-langpack/\(.*\)/LC_MESSAGES/.*:\1:p' $BUILD_ROOT/.build.log | sort -u) LNG_COUNT=0 for LNG in $LNG_LIST ; do LNG_NAME= # Handle special cases manually: case $LNG in zh_CN ) LNG_NAME="Simplified Chinese" ;; zh_TW ) LNG_NAME="Traditional Chinese" ;; esac if test -n "$LNG_NAME" ; then LNG_NAMES[LNG_COUNT++]=$LNG_NAME continue fi # Guess language name from Language-Team catalog file keyword for FILE in $BUILD_ROOT$BUILDROOT/translation-update*/usr/share/locale-langpack/$LNG/LC_MESSAGES/*.mo ; do LNG_NAME=$(msgunfmt $FILE 2>/dev/null | sed -n 's/^"Language-Team: *\([^<\]*\) *.*"$/\1/p') LNG_NAME=${LNG_NAME%% } LNG_NAME=${LNG_NAME% (http*} LNG_NAME=${LNG_NAME% Team} LNG_NAME=${LNG_NAME% Translation} LNG_NAME=${LNG_NAME#GNOME } LNG_NAME=${LNG_NAME% GNOME} # for ug: LNG_NAME=${LNG_NAME% Computer Science Association} # for ml: LNG_NAME=${LNG_NAME#Swathanthra } LNG_NAME=${LNG_NAME% Computing} LNG_NAME=${LNG_NAME%, Modern*} # Do not accept the default value "American English" for anything else than en_US. if test "$LNG_NAME" = "American English" -a "$LNG" != en_US ; then continue fi # Do not accept national names. We search for English name. if ! echo "$LNG_NAME" | iconv -f UTF-8 -t ASCII >/dev/null 2>&1 ; then continue fi # Errorneous cases. case "$LNG_NAME" in # nb # Do not accept "Novell Language" generated by Novell translation tools. # Do not accept underbar. It means that translator filled LANG variable name. # Do not accept e-mails. "Kjartan Maraas" | "Novell Language" | linux* | *_* | *@* | */* ) continue ;; esac if test -n "$LNG_NAME" ; then break fi done LNG_NAMES[LNG_COUNT++]=$LNG_NAME done echo echo "Please review following language names and fix them, if needed:" LNG_COUNT=0 for LNG in $LNG_LIST ; do echo "$LNG: ${LNG_NAMES[LNG_COUNT++]}" done LNG_COUNT=0 for LNG in $LNG_LIST ; do LNG_PKG=${LNG//@/-} cat <<EOF %package -n translation-update-$LNG_PKG Summary: Translation Updates for ${LNG_NAMES[LNG_COUNT]} Group: System/Localization Provides: locale(translation-update:$LNG) Requires: translation-update %description -n translation-update-$LNG_PKG This is a set of translation updates that are installed into the preferred directory, /usr/share/locale-langpack/<locale>/LC_MESSAGES/. Applications that use gettext correctly can then pick up overridden or updated translations from this location. EOF let LNG_COUNT++ done >translation-update.spec.preamble.tmp for LNG in $LNG_LIST ; do LNG_PKG=${LNG//@/-} cat <<EOF %files -n translation-update-$LNG_PKG %defattr(-,root,root) %dir %{_datadir}/locale-langpack %lang($LNG) %{_datadir}/locale-langpack/$LNG %doc COPYING EOF done >translation-update.spec.files.tmp bash ./translation-update-reset-lang-list.sh sed -i ' /^%prep$/{ r translation-update.spec.preamble.tmp a %prep /^%prep$/d } /^%changelog$/{ r translation-update.spec.files.tmp a %changelog /^%changelog$/d } ' translation-update.spec rm translation-update.spec.preamble.tmp translation-update.spec.files.tmp ++++++ translation-update-spec-reset-lang-list.sh ++++++ #!/bin/bash # Reset lang list for spec file. # Usage: # When build fails on missing on superfluous language packages, call: # 1. sh ./translation-update-reset-lang-list.sh # 2. osc build # it will fail # 3. sh ./translation-update-generate-lang-list.sh sed -i ' /^%package -n/,/^%prep$/c \ %prep /^%files -n/,/^%changelog$/c \ %changelog ' translation-update.spec -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de