[gclient] Never download non-git-sources in Cog

R=bryner@google.com

Bug: 382202082
Change-Id: Ifa8056e1b2d11f2a8ccede66e56d499ca4030d30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6101741
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
changes/41/6101741/2
Josip Sokcevic 4 months ago committed by LUCI CQ
parent ab3bfa4f96
commit 138f15432a

@ -3993,17 +3993,7 @@ def CMDsync(parser, args):
if options.verbose:
client.PrintLocationAndContents()
# TODO(b/349643421): remove this check when non-git-sources is fully enabled.
def gn_exists():
cwd = os.getcwd()
split_cwd = cwd.split(
'/'
) # ['/', 'google', 'cog', 'cloud', <user>, <workspace_name>, ...]
gn_path = os.path.join('/google/cog/cloud', *split_cwd[4:6],
'src/buildtools/linux64/gn')
return os.path.exists(gn_path)
if gclient_utils.IsEnvCog() and gn_exists():
if gclient_utils.IsEnvCog():
ret = client.RunOnDeps('runhooks', args)
else:
ret = client.RunOnDeps('update', args)

Loading…
Cancel
Save