Fix bug 1160728 - Unbreak Lightning 4.0b4 beta builds. rs=release-bustage,a=release CLOSED TREE to retrigger after clobber
authorPhilipp Kewisch <mozilla@kewis.ch>
Sat, 02 May 2015 10:53:53 +0200
changeset 22562 88c3dbe9e4afcdcb1b560ee323841ba3492c29d9
parent 22561 853ce1c6d4a10feb55051736b1c0e7e23d9b3a15
child 22563 5e4860468abab41b2ccdf9435a9aca8d367a4b92
push id1420
push usermbanner@mozilla.com
push dateMon, 29 Jun 2015 20:47:24 +0000
treeherdercomm-beta@b3db00bb24e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrelease-bustage, release
bugs1160728
Fix bug 1160728 - Unbreak Lightning 4.0b4 beta builds. rs=release-bustage,a=release CLOSED TREE to retrigger after clobber
calendar/lightning/Makefile.in
calendar/lightning/lightning-packager.mk
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -96,21 +96,23 @@ DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
 
 libs::
 	$(NSINSTALL) -m 0644 $(srcdir)/../timezones/zones.json $(FINAL_TARGET)/timezones
 
 include $(topsrcdir)/config/rules.mk
 include $(srcdir)/lightning-packager.mk
 include $(srcdir)/lightning-tests.mk
 
-# For Lightning, we also need to preprocess the l10n prefs
+# For Lightning, we also need to preprocess the l10n prefs. Pull in the en-US
+# copy if the files doesn't exist.
 repack-process-extrafiles: lightning-extrafiles
-lightning-extrafiles: LOCALE_BASEDIR=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)
+lightning-extrafiles: LTN_ABCD_L10NJS=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)/lightning-l10n.js
+lightning-extrafiles: LTN_ANY_L10NJS=$(if $(wildcard $(LTN_ABCD_L10NJS)),$(LTN_ABCD_L10NJS),$(topsrcdir)/calendar/locales/en-US/lightning-l10n.js)
 lightning-extrafiles:
-	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LOCALE_BASEDIR)/lightning-l10n.js  -o $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js)
+	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LTN_ANY_L10NJS) -o $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js)
 
 ident:
 	@printf 'comm_revision '
 	@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
 	    $(FINAL_TARGET)/application.ini App SourceStamp
 	@printf 'moz_revision '
 	@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
 	    $(FINAL_TARGET)/application.ini Build SourceStamp
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -85,22 +85,30 @@ unpack: $(XPI_ZIP_IN)
 	$(NSINSTALL) -D $(XPI_STAGE_PATH)/$(XPI_NAME)
 	cd $(XPI_STAGE_PATH)/$(XPI_NAME) && $(UNZIP) $(XPI_ZIP_IN)
 	@echo done unpacking
 
 # Nothing to package for en-US, its just the usual english xpi
 langpack-en-US:
 	@echo "Skipping $@ as en-US is the default"
 
+# It wouldn't fit into mozharness to run compare-locales for calendar
+# separately, so we need to do it ourselves. Unfortunately compare-locales is
+# not installed globally on the slaves, so we need to hardcode the path.
+BUILD_COMPARE_LOCALES = $(wildcard $(topsrcdir)/../compare-locales)
+COMPARE_LOCALES = $(if $(BUILD_COMPARE_LOCALES),$(PYTHON) $(BUILD_COMPARE_LOCALES)/scripts/compare-locales,compare-locales)
+COMPARE_LOCALES_PYTHONPATH = $(if $(BUILD_COMPARE_LOCALES),$(BUILD_COMPARE_LOCALES)/lib,)
+
 merge-%:
 ifdef LOCALE_MERGEDIR
 	$(RM) -rf $(LOCALE_MERGEDIR)/calendar
-	MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(topsrcdir)/calendar/locales/l10n.ini $(L10NBASEDIR) $*
+	MACOSX_DEPLOYMENT_TARGET= PYTHONPATH=$(COMPARE_LOCALES_PYTHONPATH) \
+	  $(COMPARE_LOCALES) -m $(LOCALE_MERGEDIR) $(topsrcdir)/calendar/locales/l10n.ini $(L10NBASEDIR) $*
 
-	# This file requires a bugfix with string changes, see bug XXX
+	# This file requires a bugfix with string changes, see bug 1154448
 	[ -f $(L10NBASEDIR)/$*/calendar/chrome/calendar/calendar-extract.properties ] && \
 	  $(RM) $(LOCALE_MERGEDIR)/calendar/chrome/calendar/calendar-extract.properties \
 	  || true
 else
 	@echo "Not merging Lightning locales due to missing LOCALE_MERGEDIR"
 endif
 
 # Calling these targets with prerequisites causes the libs and subsequent