Bug 1241022 - Do not handle HAS_MISC_RULE with affected_tiers. r=gps

This initiates a move off affected_tiers in VARIABLES definition to
explicit in-backend handling, which will hopfully make things clearer.

HAS_MISC_RULE is currently used to opt-in to the misc tier in a few
directories with a misc:: rule.  It is, in fact, mostly used for custom
xpi creation, which will be separately addressed in bug 1240676, so it
will eventually go away entirely, but in the meantime, we send it as a
throwaway passthru.
This commit is contained in:
Mike Hommey 2016-01-20 14:17:53 +09:00
parent 41545b65f1
commit 9dc64364e1
5 changed files with 5 additions and 4 deletions

View File

@ -497,6 +497,9 @@ class RecursiveMakeBackend(CommonBackend):
elif isinstance(obj, VariablePassthru):
# Sorted so output is consistent and we don't bump mtimes.
for k, v in sorted(obj.variables.items()):
if k == 'HAS_MISC_RULE':
self._no_skip['misc'].add(backend_file.relobjdir)
continue
if isinstance(v, list):
for item in v:
backend_file.write(

View File

@ -1029,7 +1029,7 @@ VARIABLES = {
Please note that converting ``libs`` rules to the ``misc`` tier must
be done with care, as there are many implicit dependencies that can
break the build in subtle ways.
""", 'misc'),
""", None),
'FINAL_TARGET_FILES': (ContextDerivedTypedHierarchicalStringList(Path), list,
"""List of files to be installed into the application directory.

View File

@ -595,6 +595,7 @@ class TreeMetadataEmitter(LoggingMixin):
'LD_VERSION_SCRIPT',
'USE_EXTENSION_MANIFEST',
'NO_JS_MANIFEST',
'HAS_MISC_RULE',
]
for v in varlist:
if v in context and context[v]:

View File

@ -101,8 +101,6 @@ class TestEmitterBasic(unittest.TestCase):
reldirs = [o.relativedir for o in objs]
self.assertEqual(reldirs, ['', 'foo', 'foo/biz', 'bar'])
self.assertEqual(objs[3].affected_tiers, {'misc'})
dirs = [[d.full_path for d in o.dirs] for o in objs]
self.assertEqual(dirs, [
[