Bug 1468240 - Move searchplugins to mail directory. rs=jorgk DONTBUILD
authorMichael Kaply <mozilla@kaply.com>
Wed, 13 Jun 2018 13:36:19 -0700
changeset 61666 33551f4516d03c52f67cf624ee8ece12352342df
parent 61661 cda0810fda3ea47915529284891ac7197c0c11af
child 61667 cc26614b99bbb1a3549635c4cf6cf9596aa47023
child 61670 09b17c1cce0db68633825aa9273150c399b616db
child 61685 01215911a27eef0a5573f44c561b6823dd21234a
push id6360
push usermozilla@jorgk.com
push dateThu, 14 Jun 2018 17:54:34 +0000
treeherdertry-comm-central@02eb547cbf26 [default view] [failures only]
reviewersjorgk
bugs1468240
Bug 1468240 - Move searchplugins to mail directory. rs=jorgk DONTBUILD
mail/components/search/jar.mn
mail/components/search/moz.build
mail/components/search/searchplugins/amazondotcom.xml
mail/components/search/searchplugins/aol-web-search.xml
mail/components/search/searchplugins/bing.xml
mail/components/search/searchplugins/google.xml
mail/components/search/searchplugins/list.json
mail/components/search/searchplugins/twitter.xml
mail/components/search/searchplugins/wikipedia.xml
mail/components/search/searchplugins/yahoo.xml
mail/locales/Makefile.in
mail/locales/en-US/searchplugins/amazondotcom.xml
mail/locales/en-US/searchplugins/aol-web-search.xml
mail/locales/en-US/searchplugins/bing.xml
mail/locales/en-US/searchplugins/google.xml
mail/locales/en-US/searchplugins/twitter.xml
mail/locales/en-US/searchplugins/wikipedia.xml
mail/locales/en-US/searchplugins/yahoo.xml
mail/locales/filter.py
mail/locales/jar.mn
mail/locales/l10n.toml
mail/locales/search/list.json
new file mode 100644
--- /dev/null
+++ b/mail/components/search/jar.mn
@@ -0,0 +1,8 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+messenger.jar:
+        searchplugins/                                              (searchplugins/**)
+
+% resource search-plugins %searchplugins/
--- a/mail/components/search/moz.build
+++ b/mail/components/search/moz.build
@@ -12,8 +12,10 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
     EXTRA_PP_JS_MODULES += ['WinSearchIntegration.js']
     FINAL_LIBRARY = 'mailcomps'
 
 DIRS += ['public']
 
 EXTRA_PP_JS_MODULES += [
     'SearchIntegration.js',
 ]
+
+JAR_MANIFESTS += ['jar.mn']
rename from mail/locales/en-US/searchplugins/amazondotcom.xml
rename to mail/components/search/searchplugins/amazondotcom.xml
rename from mail/locales/en-US/searchplugins/aol-web-search.xml
rename to mail/components/search/searchplugins/aol-web-search.xml
rename from mail/locales/en-US/searchplugins/bing.xml
rename to mail/components/search/searchplugins/bing.xml
rename from mail/locales/en-US/searchplugins/google.xml
rename to mail/components/search/searchplugins/google.xml
rename from mail/locales/search/list.json
rename to mail/components/search/searchplugins/list.json
rename from mail/locales/en-US/searchplugins/twitter.xml
rename to mail/components/search/searchplugins/twitter.xml
rename from mail/locales/en-US/searchplugins/wikipedia.xml
rename to mail/components/search/searchplugins/wikipedia.xml
rename from mail/locales/en-US/searchplugins/yahoo.xml
rename to mail/components/search/searchplugins/yahoo.xml
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -45,46 +45,28 @@ MOZ_PKG_MAC_ICON=$(ABS_DIST)/branding/di
 MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
 endif
 
 MOZ_SFX_PACKAGE=$(commtopsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx
 MOZ_INSTALLER_PATH=$(commtopsrcdir)/mail/installer/windows
 
 NON_OMNIJAR_FILES = defaults/messenger/mailViews.dat
 
-SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD)))
-SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
-SEARCHPLUGINS_TARGET := libs searchplugins
-SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(warning Missing searchplugin: $(plugin))))
-# Some locale-specific search plugins may have preprocessor directives, but the
-# default en-US ones do not.
-SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings
-PP_TARGETS += SEARCHPLUGINS
-
-list-json = $(SEARCHPLUGINS_PATH)/list.json
-GARBAGE += $(list-json)
-
-libs:: searchplugins
-
 # Required for l10n.mk - defines a list of app sub dirs that should
 # be included in langpack xpis.
 DIST_SUBDIRS = $(DIST_SUBDIR)
 
 include $(moztopsrcdir)/config/rules.mk
 
 ifeq ($(commreltopsrcdir),comm)
 COMPARE_LOCALES_DEFINES += -Dmozilla=..
 endif
 
 include $(moztopsrcdir)/toolkit/locales/l10n.mk
 
-$(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
-	$(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
-searchplugins:: $(list-json)
-
 $(DIST)/branding:
 	$(NSINSTALL) -D $@
 
 libs-%: AB_CD=$*
 libs-%:
 # merge if we're not en-US. Conditional function because
 # we need the current value of AB_CD.
 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
@@ -93,17 +75,16 @@ libs-%:
 	@$(MAKE) -C $(DEPTH)/devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C $(DEPTH)/devtools/startup/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C ../../chat/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) -C ../../editor/ui/locales AB_CD=$* XPI_NAME=locale-$*
 ifdef MOZ_CALENDAR
 	@$(MAKE) -C ../../calendar/locales AB_CD=$* XPI_NAME=locale-$*
 endif
 	@$(MAKE) -C $(DEPTH)/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
-	@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 
 
 package-win32-installer: $(SUBMAKEFILES)
 	$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
 
 langpack: langpack-$(AB_CD)
--- a/mail/locales/filter.py
+++ b/mail/locales/filter.py
@@ -15,12 +15,9 @@ def test(mod, path, entity=None):
   # ignore dictionaries
   if mod == "extensions/spellcheck":
     return "ignore"
 
   if path == "chrome/messenger-region/region.properties":
     return ("ignore" if (re.match(r"browser\.search\.order\.[1-9]", entity))
             else "error")
 
-  # ignore search plugins
-  if re.match(r"searchplugins\/.+\.xml", path):
-    return "ignore"
   return "error"
--- a/mail/locales/jar.mn
+++ b/mail/locales/jar.mn
@@ -205,18 +205,16 @@
   locale/@AB_CD@/messenger/newsError.dtd                                (%chrome/messenger/newsError.dtd)
   locale/@AB_CD@/messenger/chat.dtd                                     (%chrome/messenger/chat.dtd)
   locale/@AB_CD@/messenger/chat.properties                              (%chrome/messenger/chat.properties)
   locale/@AB_CD@/messenger/addbuddy.dtd                                 (%chrome/messenger/addbuddy.dtd)
   locale/@AB_CD@/messenger/joinChat.dtd                                 (%chrome/messenger/joinChat.dtd)
   locale/@AB_CD@/messenger/imAccounts.properties                        (%chrome/messenger/imAccounts.properties)
   locale/@AB_CD@/messenger/imAccountWizard.dtd                          (%chrome/messenger/imAccountWizard.dtd)
   locale/@AB_CD@/messenger/sanitize.dtd									(%chrome/messenger/sanitize.dtd)
-  locale/@AB_CD@/messenger/searchplugins/list.json                      (.deps/generated_@AB_CD@/list.json)
-  locale/@AB_CD@/messenger/searchplugins/                               (.deps/generated_@AB_CD@/*.xml)
 % locale messenger-mapi @AB_CD@ %locale/@AB_CD@/messenger-mapi/
   locale/@AB_CD@/messenger-mapi/mapi.properties                         (%chrome/messenger-mapi/mapi.properties)
 % locale messenger-newsblog @AB_CD@ %locale/@AB_CD@/messenger-newsblog/
   locale/@AB_CD@/messenger-newsblog/newsblog.properties                 (%chrome/messenger-newsblog/newsblog.properties)
   locale/@AB_CD@/messenger-newsblog/feed-subscriptions.dtd              (%chrome/messenger-newsblog/feed-subscriptions.dtd)
   locale/@AB_CD@/messenger-newsblog/am-newsblog.dtd                     (%chrome/messenger-newsblog/am-newsblog.dtd)
 % locale messenger-smime @AB_CD@ %locale/@AB_CD@/messenger-smime/
   locale/@AB_CD@/messenger-smime/msgCompSMIMEOverlay.dtd                (%chrome/messenger-smime/msgCompSMIMEOverlay.dtd)
--- a/mail/locales/l10n.toml
+++ b/mail/locales/l10n.toml
@@ -127,13 +127,8 @@ locales = [
     ]
     action = "ignore"
 
 # search prefs don't have the same number for all locales
 [[filters]]
     path = "{l}mail/chrome/messenger-region/region.properties"
     key = "re:browser\\.search\\.order\\.[1-9].*"
     action = "ignore"
-
-# search plugins are different per locale, ignore file difference
-[[filters]]
-    path = "{l}mail/searchplugins/*.xml"
-    action = "ignore"