Bug 1235021 - Normalize whitespaces in manifest entries emitted by the jar manifest parser. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 24 Dec 2015 15:04:43 +0900
changeset 277916 7880d2168cf7f4f4158c0ee34e0566ce10b29995
parent 277915 cce5cfe52a3db8bbabf8539c5715f62793715c9f
child 277917 666f5a3e18a410fe198c1a3977d248b064358572
push id69650
push usermh@glandium.org
push dateWed, 30 Dec 2015 22:08:21 +0000
treeherdermozilla-inbound@70708efd7d3b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1235021
milestone46.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 1235021 - Normalize whitespaces in manifest entries emitted by the jar manifest parser. r=gps Again, this is not strictly necessary but allows to confirm idempotence of further changes. And it has the nice side effect of making chrome manifest files more consistent.
python/mozbuild/mozbuild/jar.py
python/mozbuild/mozbuild/test/backend/data/build/jar.mn
--- a/python/mozbuild/mozbuild/jar.py
+++ b/python/mozbuild/mozbuild/jar.py
@@ -149,17 +149,17 @@ class JarManifestParser(object):
                 self._current_jar = JarInfo(self._current_jar)
                 self._jars.append(self._current_jar)
             self._current_jar.relativesrcdir = m.group('relativesrcdir')
             return
 
         # - chrome manifest entries, prefixed with "%".
         m = self.regline.match(line)
         if m:
-            rline = m.group(1)
+            rline = ' '.join(m.group(1).split())
             if rline not in self._current_jar.chrome_manifests:
                 self._current_jar.chrome_manifests.append(rline)
             return
 
         # - entries indicating files to be part of the given jar. They are
         # formed thusly:
         #   "<dest_path>"
         # or
--- a/python/mozbuild/mozbuild/test/backend/data/build/jar.mn
+++ b/python/mozbuild/mozbuild/test/backend/data/build/jar.mn
@@ -2,9 +2,9 @@ foo.jar:
 % content bar %child/
 % content foo %
   foo.js
   bar.js          (subdir/bar.js)
   qux.js          (subdir/bar.js)
 * child/hoge.js   (bar.js)
 * child/baz.jsm
 
-% override chrome://foo/bar.svg#hello chrome://bar/bar.svg#hello
+% override   chrome://foo/bar.svg#hello   chrome://bar/bar.svg#hello