Bug 923950 - Fix Android l10n single locale repacks on Beta. r=glandium, a=bajaj
authorNick Alexander <nalexander@mozilla.com>
Wed, 15 Jan 2014 12:21:54 -0800
changeset 167917 4cc7086ff4255b5d1945a6363eeac1e41c088596
parent 167916 12e33df9b2061e335aeff968274bde61ae0a7dbe
child 167918 5a8f426588b9881cef05e9a4e1f887d78c2a56c8
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, bajaj
bugs923950, 951238, 934646
milestone27.0
Bug 923950 - Fix Android l10n single locale repacks on Beta. r=glandium, a=bajaj This uplifts just enough of the fixes from Bug 951238 (which itself fixes Android l10n single locale repacks after Bug 934646) to fix repacks on Beta.
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -401,16 +401,27 @@ endif
 # layout expected by language repacks. Therefore, we move it to the
 # correct path here, in INNER_MAKE_PACKAGE. See comment about
 # OMNIJAR_NAME in configure.in.
 
 # OMNIJAR_DIR is './' for "omni.ja", 'assets/' for "assets/omni.ja".
 OMNIJAR_DIR := $(dir $(OMNIJAR_NAME))
 OMNIJAR_NAME := $(notdir $(OMNIJAR_NAME))
 
+# A note on the res/ directory.  We unzip the ap_ during packaging,
+# which produces the res/ directory.  This directory is then included
+# in the final package.  When we unpack (during locale repacks), we
+# need to remove the res/ directory because these resources confuse
+# the l10n packaging script that updates omni.ja: the script tries to
+# localize the contents of the res/ directory, which fails.  Instead,
+# after the l10n packaging script completes, we build the ap_
+# described above (which includes freshly localized Android resources)
+# and the res/ directory is taken from the ap_ as part of the regular
+# packaging.
+
 PKG_SUFFIX      = .apk
 INNER_MAKE_PACKAGE	= \
   $(if $(ALREADY_SZIPPED),,$(foreach lib,$(SZIP_LIBRARIES),host/bin/szip $(MOZ_SZIP_FLAGS) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) && )) \
   make -C $(GECKO_APP_AP_PATH) gecko.ap_ && \
   cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \
   ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
     mkdir -p lib/$(ABI_DIR) && \
     mv libmozglue.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \
@@ -438,17 +449,18 @@ INNER_MAKE_PACKAGE	= \
 # OMNIJAR_NAME earlier in this file and in configure.in.
 
 INNER_UNMAKE_PACKAGE	= \
   mkdir $(MOZ_PKG_DIR) && \
   ( cd $(MOZ_PKG_DIR) && \
     $(UNZIP) $(UNPACKAGE) && \
     mv lib/$(ABI_DIR)/libmozglue.so . && \
     mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \
-    rm -rf lib/$(ABI_DIR) \
+    rm -rf lib/$(ABI_DIR) && \
+    rm -rf res \
     $(if $(filter-out ./,$(OMNIJAR_DIR)), \
       && mv $(OMNIJAR_DIR)$(OMNIJAR_NAME) $(OMNIJAR_NAME)) )
 endif
 
 ifeq ($(MOZ_PKG_FORMAT),DMG)
 PKG_SUFFIX	= .dmg
 PKG_DMG_FLAGS	=
 ifneq (,$(MOZ_PKG_MAC_DSSTORE))