Bug 1383880: --from-build is a dev tool, not for automation; r?glandium
MozReview-Commit-ID: EGs3Zy012JA
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1877,16 +1877,21 @@ class PackageFrontend(MachCommandBase):
record.digest)
records[record.filename] = DownloadRecord(
url, record.filename, record.size, record.digest,
record.algorithm, unpack=record.unpack,
version=record.version, visibility=record.visibility,
setup=record.setup)
if from_build:
+ if 'TASK_ID' in os.environ:
+ self.log(logging.ERROR, 'artifact', {},
+ 'Do not use --from-build in automation; all dependencies '
+ 'should be determined in the decision task.')
+ return 1
from taskgraph.optimize import IndexSearch
params = {
'message': '',
'project': '',
'level': os.environ.get('MOZ_SCM_LEVEL', '3'),
'base_repository': '',
'head_repository': '',
'head_rev': '',