Bug 1236259 - Normalize LOCALE_MERGEDIR paths; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Mon, 04 Jan 2016 11:13:31 -0800
changeset 318739 c25e61e368909c615b7b425ca4e33bafc6ebfac7
parent 318738 11acb7e361fe445eb563fa43d552f3d10dac56d9
child 512486 fad71d0f7b8daa1fe145925665e27669f9717ab4
push id8913
push usergszorc@mozilla.com
push dateMon, 04 Jan 2016 19:13:43 +0000
reviewersted
bugs1236259
milestone46.0a1
Bug 1236259 - Normalize LOCALE_MERGEDIR paths; r?ted glandium suggests doing this to fix l10n builds. This is a shot in the dark. It should either work or completely break things.
testing/mozharness/mozharness/mozilla/l10n/multi_locale_build.py
testing/mozharness/scripts/b2g_desktop_multilocale.py
--- a/testing/mozharness/mozharness/mozilla/l10n/multi_locale_build.py
+++ b/testing/mozharness/mozharness/mozilla/l10n/multi_locale_build.py
@@ -148,17 +148,17 @@ class MultiLocaleBuild(LocalesMixin, Mer
         c = self.config
         dirs = self.query_abs_dirs()
         locales = self.query_locales()
 
         for locale in locales:
             self.run_compare_locales(locale, halt_on_failure=True)
             command = 'make chrome-%s L10NBASEDIR=%s' % (locale, dirs['abs_l10n_dir'])
             if c['merge_locales']:
-                command += " LOCALE_MERGEDIR=%s" % dirs['abs_merge_dir']
+                command += " LOCALE_MERGEDIR=%s" % dirs['abs_merge_dir'].replace(os.sep, '/')
             status = self._process_command(command=command,
                                            cwd=dirs['abs_locales_dir'],
                                            error_list=MakefileErrorList)
             if status:
                 self.return_code += 1
                 self.add_summary("Failed to add locale %s!" % locale,
                                  level="error")
             else:
--- a/testing/mozharness/scripts/b2g_desktop_multilocale.py
+++ b/testing/mozharness/scripts/b2g_desktop_multilocale.py
@@ -158,35 +158,37 @@ class B2gMultilocale(LocalesMixin, BaseS
     def build(self):
         """ Do the multilocale portion of the build + packaging.
         """
         dirs = self.query_abs_dirs()
         gecko_locales = self.query_locales()
         make = self.query_exe('make', return_type='string')
         env = self.query_env(
             partial_env={
-                'LOCALE_MERGEDIR': dirs['abs_merge_dir'],
+                'LOCALE_MERGEDIR': dirs['abs_merge_dir'].replace(os.sep, '/'),
                 'MOZ_CHROME_MULTILOCALE': 'en-US ' + ' '.join(gecko_locales),
             }
         )
         merge_env = self.query_env(
             partial_env={
                 'PATH': '%(PATH)s' + os.pathsep + os.path.join(dirs['abs_compare_locales_dir'], 'scripts'),
                 'PYTHONPATH': os.path.join(dirs['abs_compare_locales_dir'],
                                            'lib'),
 
             }
         )
         for locale in gecko_locales:
-            command = make + ' merge-%s L10NBASEDIR=%s LOCALE_MERGEDIR=%s' % (locale, dirs['abs_l10n_dir'], dirs['abs_merge_dir'])
+            command = make + ' merge-%s L10NBASEDIR=%s LOCALE_MERGEDIR=%s' % (
+                locale, dirs['abs_l10n_dir'], dirs['abs_merge_dir'].replace(os.sep, '/'))
             status = self.run_command(command,
                                       cwd=dirs['abs_locales_dir'],
                                       error_list=MakefileErrorList,
                                       env=merge_env)
-            command = make + ' chrome-%s L10NBASEDIR=%s LOCALE_MERGEDIR=%s' % (locale, dirs['abs_l10n_dir'], dirs['abs_merge_dir'])
+            command = make + ' chrome-%s L10NBASEDIR=%s LOCALE_MERGEDIR=%s' % (
+                locale, dirs['abs_l10n_dir'], dirs['abs_merge_dir'].replace(os.sep, '/'))
             status = self.run_command(command,
                                       cwd=dirs['abs_locales_dir'],
                                       error_list=MakefileErrorList)
             if status:
                 self.add_summary("Failed to add locale %s!" % locale, level=ERROR)
         command = make + ' -C app'
         self.run_command(command,
                          cwd=os.path.join(dirs['abs_objdir'], 'b2g'),