Bug 1411951 - Use mozpack.path.normsep when generating chrome entry paths for langpack manifest.json. r=mshal
authorZibi Braniecki <zbraniecki@mozilla.com>
Sat, 28 Oct 2017 21:40:12 -0700
changeset 443168 a4fb78381ea0fe9fddd36a8ea7b74a63062a1bf3
parent 443167 6fa4468dd31edf46f34a95d947e0798b06ae8e50
child 443169 66ef885f0b66cb680a3f0734bfbfd8fd385fa104
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1411951
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1411951 - Use mozpack.path.normsep when generating chrome entry paths for langpack manifest.json. r=mshal MozReview-Commit-ID: L8kVm1ISkzD
python/mozbuild/mozbuild/action/langpack_manifest.py
--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
@@ -13,16 +13,17 @@ from __future__ import absolute_import
 import argparse
 import sys
 import os
 import json
 import io
 import datetime
 import requests
 import mozversioncontrol
+import mozpack.path as mozpath
 from mozpack.chrome.manifest import (
     Manifest,
     ManifestLocale,
     parse_manifest,
 )
 from mozbuild.preprocessor import Preprocessor
 
 
@@ -262,28 +263,29 @@ def parse_chrome_manifest(path, base_pat
     for entry in parse_manifest(None, path):
         if isinstance(entry, Manifest):
             parse_chrome_manifest(
                 os.path.join(os.path.dirname(path), entry.relpath),
                 base_path,
                 chrome_entries
             )
         elif isinstance(entry, ManifestLocale):
+            entry_path = os.path.join(
+                os.path.relpath(
+                    os.path.dirname(path),
+                    base_path
+                ),
+                entry.relpath
+            )
             chrome_entries.append({
                 'type': 'locale',
                 'alias': entry.name,
                 'locale': entry.id,
                 'platforms': convert_entry_flags_to_platform_codes(entry.flags),
-                'path': os.path.join(
-                    os.path.relpath(
-                        os.path.dirname(path),
-                        base_path
-                    ),
-                    entry.relpath
-                )
+                'path': mozpath.normsep(entry_path)
             })
         else:
             raise Exception('Unknown type {0}'.format(entry.name))
 
 
 ###
 # Generates a new web manifest dict with values specific for a language pack.
 #