Bug 1369630 - Fix `mach artifact toolchain --from-build` after bug 1345863 and bug 1351010. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 02 Jun 2017 15:48:33 +0900
changeset 410200 181f02a8a7e896de9e2de40a06f3e0f9b906c71b
parent 410199 fb9cc965d50bfda7d44b26fb132369c5594d4cd4
child 410201 a784646bf7be61e19fc345a5eb30fdc5c326ee62
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1369630, 1345863, 1351010
milestone55.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 1369630 - Fix `mach artifact toolchain --from-build` after bug 1345863 and bug 1351010. r=gps The former removed the /opt from the toolchain job names, and the latter made optimize_task() return a single value.
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1743,30 +1743,27 @@ class PackageFrontend(MachCommandBase):
                         for task in tasks
                     }
 
             toolchains = tasks('toolchain')
 
             for b in from_build:
                 user_value = b
 
-                if '/' not in b:
-                    b = '{}/opt'.format(b)
-
                 if not b.startswith('toolchain-'):
                     b = 'toolchain-{}'.format(b)
 
                 task = toolchains.get(b)
                 if not task:
                     self.log(logging.ERROR, 'artifact', {'build': user_value},
                              'Could not find a toolchain build named `{build}`')
                     return 1
 
-                optimized, task_id = optimize_task(task, {})
-                if not optimized:
+                task_id = optimize_task(task, {})
+                if task_id in (True, False):
                     self.log(logging.ERROR, 'artifact', {'build': user_value},
                              'Could not find artifacts for a toolchain build '
                              'named `{build}`')
                     return 1
 
                 for artifact in list_artifacts(task_id):
                     name = artifact['name']
                     if not name.startswith('public/'):