Bug 1383880: adjust mach artifact toolchain --from-build; r=glandium

MozReview-Commit-ID: AhGS54jB8Wl

--HG--
extra : rebase_source : 2153d538daaf7f049fac1f0aa23f83eb5d2fb77b
This commit is contained in:
Dustin J. Mitchell 2017-09-19 12:55:37 +00:00
Родитель bdd0ccb0a8
Коммит fc50c56e23
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1784,7 +1784,6 @@ class PackageFrontend(MachCommandBase):
import shutil
from taskgraph.generator import Kind
from taskgraph.optimize import optimize_task
from taskgraph.util.taskcluster import (
get_artifact_url,
list_artifacts,
@ -1883,6 +1882,7 @@ class PackageFrontend(MachCommandBase):
setup=record.setup)
if from_build:
from taskgraph.optimize import IndexSearch
params = {
'message': '',
'project': '',
@ -1928,7 +1928,8 @@ class PackageFrontend(MachCommandBase):
'Could not find a toolchain build named `{build}`')
return 1
task_id = optimize_task(task, {})
task_id = IndexSearch().should_replace_task(
task, {}, task.optimization.get('index-search', []))
artifact_name = task.attributes.get('toolchain-artifact')
if task_id in (True, False) or not artifact_name:
self.log(logging.ERROR, 'artifact', {'build': user_value},