[firefox] WIP - default langpack fix

Martin Stransky stransky at fedoraproject.org
Tue Jul 10 08:35:42 UTC 2012


commit a62de3b29587ca0c10f5b2b68b71195379e7f9fa
Author: Martin Stransky <stransky at anakreon.cz>
Date:   Tue Jul 10 10:35:34 2012 +0200

    WIP - default langpack fix

 firefox.sh.in |    5 ++---
 firefox.spec  |   11 +++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/firefox.sh.in b/firefox.sh.in
index dbb9997..d89d4f2 100644
--- a/firefox.sh.in
+++ b/firefox.sh.in
@@ -189,8 +189,7 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
     CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
     CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
     
-    # Try without a local variant first, then with a local variant
-    # So that pt-BR doesn't try to use pt for example
+    # Try with a local variant first, then without a local variant
     SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
     MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
 
@@ -207,7 +206,7 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
         return 1
     }
 
-    create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
+    create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true
 fi
 
 # Prepare command line arguments
diff --git a/firefox.spec b/firefox.spec
index dcfca37..3549cb7 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -282,6 +282,17 @@ done
 %{__rm} -rf firefox-langpacks
 %endif # build_langpacks
 
+# Install langpack workaround (see #707100, #821169)
+function create_default_langpack() {
+language_long=$1
+language_short=$2
+cd $RPM_BUILD_ROOT%{langpackdir}
+ln -s langpack-$language_long at firefox.mozilla.org.xpi langpack-$language_short at firefox.mozilla.org.xpi
+cd -
+}
+
+# Test that we have all langpacks in default setup
+
 # System extensions
 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}
 %{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_app_id}


More information about the scm-commits mailing list