Bug 1229341 - Remove .source flag on BRANDING_FILES. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 01 Dec 2015 21:08:16 +0900
changeset 275331 249b4d65a3516df20804599267e934c3c7c8bdc8
parent 275330 03b626d4e9a2b2078203955c1bcbe67ffa43df1c
child 275332 917c97129ea879c0e79a93d8d97d421d79ceb210
push id68822
push usermh@glandium.org
push dateThu, 03 Dec 2015 04:34:41 +0000
treeherdermozilla-inbound@5c9fd9b2efbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1229341, 344236
milestone45.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 1229341 - Remove .source flag on BRANDING_FILES. r=gps The only use of BRANDING_FILES[...].source is in xulrunner/app/moz.build, for the app.ico file. This file has not been useful since the removal of the xpinstall-based installer in bug 344236... 9 years ago.
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/test/backend/data/branding-files/moz.build
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/frontend/data/branding-files/moz.build
python/mozbuild/mozbuild/test/frontend/test_emitter.py
xulrunner/app/moz.build
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -19,17 +19,16 @@ from __future__ import absolute_import, 
 import os
 
 from collections import (
     Counter,
     OrderedDict,
 )
 from mozbuild.util import (
     HierarchicalStringList,
-    HierarchicalStringListWithFlagsFactory,
     KeyedDefaultDict,
     List,
     memoize,
     memoized_property,
     ReadOnlyKeyedDefaultDict,
     StrictOrderingOnAppendList,
     StrictOrderingOnAppendListWithFlagsFactory,
     TypedList,
@@ -1187,35 +1186,28 @@ VARIABLES = {
         """, None),
 
     'LD_VERSION_SCRIPT': (unicode, unicode,
         """The linker version script for shared libraries.
 
         This variable can only be used on Linux.
         """, None),
 
-    'BRANDING_FILES': (HierarchicalStringListWithFlagsFactory({'source': unicode}), list,
+    'BRANDING_FILES': (HierarchicalStringList, list,
         """List of files to be installed into the branding directory.
 
         ``BRANDING_FILES`` will copy (or symlink, if the platform supports it)
         the contents of its files to the ``dist/branding`` directory. Files that
         are destined for a subdirectory can be specified by accessing a field.
         For example, to export ``foo.png`` to the top-level directory and
         ``bar.png`` to the directory ``images/subdir``, append to
         ``BRANDING_FILES`` like so::
 
            BRANDING_FILES += ['foo.png']
            BRANDING_FILES.images.subdir += ['bar.png']
-
-        If the source and destination have different file names, add the
-        destination name to the list and set the ``source`` property on the
-        entry, like so::
-
-           BRANDING_FILES.dir += ['baz.png']
-           BRANDING_FILES.dir['baz.png'].source = 'quux.png'
         """, None),
 
     'SDK_LIBRARY': (bool, bool,
         """Whether the library built in the directory is part of the SDK.
 
         The library will be copied into ``SDK_LIB_DIR`` (``$DIST/sdk/lib``).
         """, None),
 
--- a/python/mozbuild/mozbuild/test/backend/data/branding-files/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/branding-files/moz.build
@@ -1,14 +1,12 @@
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
 BRANDING_FILES += [
-    'app.ico',
     'bar.ico',
     'sub/quux.png',
 ]
-BRANDING_FILES['app.ico'].source = 'bar.ico'
 
 BRANDING_FILES.icons += [
     'foo.ico',
 ]
 
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -411,18 +411,17 @@ class TestRecursiveMakeBackend(BackendTe
 
     def test_branding_files(self):
         """Ensure BRANDING_FILES is handled properly."""
         env = self._consume('branding-files', RecursiveMakeBackend)
 
         #BRANDING_FILES should appear in the dist_branding install manifest.
         m = InstallManifest(path=os.path.join(env.topobjdir,
             '_build_manifests', 'install', 'dist_branding'))
-        self.assertEqual(len(m), 4)
-        self.assertIn('app.ico', m)
+        self.assertEqual(len(m), 3)
         self.assertIn('bar.ico', m)
         self.assertIn('quux.png', m)
         self.assertIn('icons/foo.ico', m)
 
     def test_test_manifests_files_written(self):
         """Ensure test manifests get turned into files."""
         env = self._consume('test-manifests-written', RecursiveMakeBackend)
 
--- a/python/mozbuild/mozbuild/test/frontend/data/branding-files/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/branding-files/moz.build
@@ -1,15 +1,13 @@
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
 BRANDING_FILES += [
-    'app.ico',
     'bar.ico',
     'baz.png',
     'foo.xpm',
 ]
-BRANDING_FILES['app.ico'].source = 'test/bar.ico'
 
 BRANDING_FILES.icons += [
     'quux.icns',
 ]
 
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -285,18 +285,17 @@ class TestEmitterBasic(unittest.TestCase
         reader = self.reader('branding-files')
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 1)
         self.assertIsInstance(objs[0], BrandingFiles)
 
         files = objs[0].files
 
-        self.assertEqual(files._strings, ['app.ico', 'bar.ico', 'baz.png', 'foo.xpm'])
-        self.assertEqual(files['app.ico'].source, 'test/bar.ico')
+        self.assertEqual(files._strings, ['bar.ico', 'baz.png', 'foo.xpm'])
 
         self.assertIn('icons', files._children)
         icons = files._children['icons']
 
         self.assertEqual(icons._strings, ['quux.icns'])
 
     def test_program(self):
         reader = self.reader('program')
--- a/xulrunner/app/moz.build
+++ b/xulrunner/app/moz.build
@@ -55,20 +55,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 DISABLE_STL_WRAPPING = True
 
 JS_PREFERENCE_PP_FILES += [
     'xulrunner.js',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     BRANDING_FILES += [
-        'app.ico',
         'document.ico',
         'xulrunner.ico',
     ]
-    BRANDING_FILES['app.ico'].source = 'xulrunner.ico'
 
 if CONFIG['MOZ_WIDGET_GTK']:
     BRANDING_FILES += [
         'default16.png',
         'default32.png',
         'default48.png',
     ]