Bug 1426785 - Allow more mach artifact toolchain calls to not use a tooltool manifest. r=gps

We're about to remove some tooltool manifests, so we need those calls to
work properly when TOOLTOOL_MANIFEST is not set.

--HG--
extra : rebase_source : 89d41021a87915dc9133e61543352e3bda1dace4
This commit is contained in:
Mike Hommey 2017-12-22 07:48:14 +09:00
parent a6e25e84a3
commit de81c42aa0
3 changed files with 7 additions and 5 deletions

View File

@ -53,7 +53,7 @@ export MOZ_OBJDIR="$WORKSPACE/obj-analyzed"
mkdir -p "$MOZ_OBJDIR"
if [ -n "$DO_TOOLTOOL" ]; then
( cd $TOOLTOOL_DIR; $GECKO_DIR/mach artifact toolchain -v --tooltool-url https://tooltool.mozilla-releng.net/ --tooltool-manifest $GECKO_DIR/$TOOLTOOL_MANIFEST --cache-dir $TOOLTOOL_CACHE${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}} )
( cd $TOOLTOOL_DIR; $GECKO_DIR/mach artifact toolchain -v${TOOLTOOL_MANIFEST:+ --tooltool-url https://tooltool.mozilla-releng.net/ --tooltool-manifest $GECKO_DIR/$TOOLTOOL_MANIFEST} --cache-dir $TOOLTOOL_CACHE${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}} )
fi
export NO_MERCURIAL_SETUP_CHECK=1

View File

@ -56,7 +56,7 @@ BROWSER_PLATFORM=$PLATFORM_OS$BITS
: ${TOOLTOOL_CHECKOUT:=$WORK}
export TOOLTOOL_CHECKOUT
(cd $TOOLTOOL_CHECKOUT && ${SRCDIR}/mach artifact toolchain -v $TOOLTOOL_AUTH_FLAGS --tooltool-url $TOOLTOOL_SERVER --tooltool-manifest $SRCDIR/$TOOLTOOL_MANIFEST ${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
(cd $TOOLTOOL_CHECKOUT && ${SRCDIR}/mach artifact toolchain${TOOLTOOL_MANIFEST:+ -v $TOOLTOOL_AUTH_FLAGS --tooltool-url $TOOLTOOL_SERVER --tooltool-manifest $SRCDIR/$TOOLTOOL_MANIFEST}${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
# Add all the tooltool binaries to our $PATH.
for bin in $TOOLTOOL_CHECKOUT/*/bin $TOOLTOOL_CHECKOUT/VC/bin/Hostx64/x86; do

View File

@ -5,7 +5,6 @@ sys.path.insert(1, os.path.dirname(sys.path[0])) # noqa - don't warn about impo
from mozharness.base.log import FATAL
from mozharness.base.script import BaseScript
from mozharness.mozilla.mock import ERROR_MSGS
class Repackage(BaseScript):
@ -89,11 +88,12 @@ class Repackage(BaseScript):
def _run_tooltool(self):
config = self.config
dirs = self.query_abs_dirs()
toolchains = os.environ.get('MOZ_TOOLCHAINS')
manifest_src = os.environ.get('TOOLTOOL_MANIFEST')
if not manifest_src:
manifest_src = config.get('tooltool_manifest_src')
if not manifest_src:
return self.warning(ERROR_MSGS['tooltool_manifest_undetermined'])
if not manifest_src and not toolchains:
return
tooltool_manifest_path = os.path.join(dirs['abs_mozilla_dir'],
manifest_src)
@ -117,6 +117,8 @@ class Repackage(BaseScript):
cache = config.get('tooltool_cache')
if cache:
cmd.extend(['--cache-dir', cache])
if toolchains:
cmd.extend(toolchains.split())
self.info(str(cmd))
self.run_command(cmd, cwd=dirs['abs_mozilla_dir'], halt_on_failure=True)