diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 9ad4672606e3..a4d958c339c4 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -180,7 +180,7 @@ res/values/strings.xml: FORCE $(MAKE) -C locales all_resources = \ - AndroidManifest.xml \ + $(CURDIR)/AndroidManifest.xml \ $(android_res_files) \ $(ANDROID_GENERATED_RESFILES) \ $(NULL) @@ -228,8 +228,8 @@ endef # .aapt.deps: $(all_resources) $(eval $(call aapt_command,.aapt.deps,$(all_resources),gecko.ap_,$(gecko_package_dir)/,./)) -# .aapt.nodeps: FORCE -$(eval $(call aapt_command,.aapt.nodeps,FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/)) +# .aapt.nodeps: $(CURDIR)/AndroidManifest.xml FORCE +$(eval $(call aapt_command,.aapt.nodeps,$(CURDIR)/AndroidManifest.xml FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/)) fennec_ids.txt: $(gecko_package_dir)/R.java fennec-ids-generator.py $(PYTHON) $(topsrcdir)/mobile/android/base/fennec-ids-generator.py -i $< -o $@ diff --git a/python/mozbuild/mozbuild/jar.py b/python/mozbuild/mozbuild/jar.py index db9fa4811113..98c17cce76ed 100644 --- a/python/mozbuild/mozbuild/jar.py +++ b/python/mozbuild/mozbuild/jar.py @@ -507,8 +507,8 @@ def main(args=None): jm.relativesrcdir = options.relativesrcdir jm.l10nmerge = options.locale_mergedir if jm.l10nmerge and not os.path.isdir(jm.l10nmerge): - logging.warning("WARNING: --locale-mergedir passed, but '%s' does not exist. Ignore this message if the locale is complete." - ) + logging.warning("WARNING: --locale-mergedir passed, but '%s' does not exist. " + "Ignore this message if the locale is complete." % jm.l10nmerge) elif options.locale_mergedir: p.error('l10n-base required when using locale-mergedir') jm.localedirs = options.l10n_src diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 1dea725bd03e..1851a606cf4d 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -445,14 +445,28 @@ OMNIJAR_NAME := $(notdir $(OMNIJAR_NAME)) # thing if there are resource changes in between build time and # package time. We try to prevent mismatched resources by erroring # out if the compiled resource IDs are not the same as the resource -# IDs being packaged. +# IDs being packaged. If we're doing a single locale repack, however, +# we don't have a complete object directory, so we can't compare +# resource IDs. + +# 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-nodeps.ap_ && \ cp $(GECKO_APP_AP_PATH)/gecko-nodeps.ap_ $(_ABS_DIST)/gecko.ap_ && \ - ( diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \ + ( (test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \ + diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \ (echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1)) && \ ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \ mkdir -p lib/$(ABI_DIR) && \ @@ -487,6 +501,7 @@ INNER_UNMAKE_PACKAGE = \ mv lib/$(ABI_DIR)/libmozglue.so . && \ mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \ rm -rf lib/$(ABI_DIR) \ + rm -rf res \ $(if $(filter-out ./,$(OMNIJAR_DIR)), \ && mv $(OMNIJAR_DIR)$(OMNIJAR_NAME) $(OMNIJAR_NAME)) ) endif