diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 60710373e3b0..d00559da22ff 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -1313,8 +1313,6 @@ class PackageFrontend(MachCommandBase): import requests import shutil - from taskgraph.config import load_graph_config - from taskgraph.generator import Kind from taskgraph.util.taskcluster import ( get_artifact_url, ) @@ -1433,7 +1431,8 @@ class PackageFrontend(MachCommandBase): strict=False, ) - toolchains = load_tasks_for_kind(params, 'toolchain') + root_dir = mozpath.join(self.topsrcdir, 'taskcluster/ci') + toolchains = load_tasks_for_kind(params, 'toolchain', root_dir=root_dir) aliases = {} for t in toolchains.values(): diff --git a/taskcluster/taskgraph/generator.py b/taskcluster/taskgraph/generator.py index 91aea7295f25..aeaaa071d749 100644 --- a/taskcluster/taskgraph/generator.py +++ b/taskcluster/taskgraph/generator.py @@ -382,13 +382,13 @@ class TaskGraphGenerator(object): ) -def load_tasks_for_kind(parameters, kind): +def load_tasks_for_kind(parameters, kind, root_dir=None): """ Get all the tasks of a given kind. This function is designed to be called from outside of taskgraph. """ - tgg = TaskGraphGenerator(root_dir=None, parameters=parameters, target_kind=kind) + tgg = TaskGraphGenerator(root_dir=root_dir, parameters=parameters, target_kind=kind) return { task.task['metadata']['name']: task for task in tgg.full_task_set