Bug 1311115 - c-c l10n repacks: Error: Multiple locales aren't supported. r=aleth
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 19 Oct 2016 18:32:03 +0200
changeset 20577 da5fe4ebcd7826eed28dce41618156194015dd1e
parent 20576 7756270ec6ed74b3da6d4a9214e327327860be3c
child 20578 d377848939e2f02ae2877e8172f7c3ce6f79f2d7
push id12431
push usermozilla@kewis.ch
push dateWed, 19 Oct 2016 16:32:26 +0000
treeherdercomm-central@da5fe4ebcd78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleth
bugs1311115
Bug 1311115 - c-c l10n repacks: Error: Multiple locales aren't supported. r=aleth MozReview-Commit-ID: IYcpzUQpVvn
calendar/lightning/lightning-packager.mk
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -97,28 +97,23 @@ 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= PYTHONPATH=$(COMPARE_LOCALES_PYTHONPATH) \
-	  $(COMPARE_LOCALES) -m $(LOCALE_MERGEDIR) $(topsrcdir)/calendar/locales/l10n.ini $(L10NBASEDIR) $*
+	$(MOZILLA_SRCDIR)/mach compare-locales \
+	    --merge-dir $(LOCALE_MERGEDIR) \
+	    --l10n-ini $(topsrcdir)/calendar/locales/l10n.ini \
+	    $*
 
 	# 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
@@ -140,17 +135,17 @@ clobber-%:
 
 repackage-zip-%:
 	@echo "Already repackaged zip for $* in langpack step"
 
 repack-stage:
 	@echo "Repackaging $(XPI_PKGNAME) locale for Language $(AB_CD)"
 	$(RM) -rf $(L10N_TARGET)
 	cp -R $(XPI_STAGE_PATH)/$(XPI_NAME) $(L10N_TARGET)
-	grep -v 'locale \D\+ en-US' $(L10N_TARGET)/chrome.manifest > $(L10N_TARGET)/chrome.manifest~ && \
+	grep -v 'locale \S\+ en-US' $(L10N_TARGET)/chrome.manifest > $(L10N_TARGET)/chrome.manifest~ && \
 	  mv $(L10N_TARGET)/chrome.manifest~ $(L10N_TARGET)/chrome.manifest
 	find $(abspath $(L10N_TARGET)) -name '*en-US*' -print0 | xargs -0 rm -rf
 
 
 # Actual locale packaging targets. If L10N_XPI_NAME is set, then use it.
 # Otherwise keep the original XPI_NAME
 # Overriding the final target is a bit of a hack for universal builds
 # so that we can ensure we get the right xpi that gets repacked.