mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[siso] check presence of .sisoenv file
`set([primary_solution_path, gclient_root_path, gclient_src_root_path])` doesn't guarantee order. This is problematic when `SISO_PATH` is used because it doesn't check the presence of `third_party/siso/siso` binary. This CL changes siso.py to check the presence of `.sisoenv` to detect the correct `base_dir`. Change-Id: Ieb1acc44269037d43c793eb28cd2f12ad0179b17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4625315 Auto-Submit: Junji Watanabe <jwata@google.com> Commit-Queue: Junji Watanabe <jwata@google.com> Reviewed-by: Philipp Wollermann <philwo@google.com> Reviewed-by: Fumitoshi Ukai <ukai@google.com>
This commit is contained in:
15
siso.py
15
siso.py
@@ -57,19 +57,20 @@ def main(args):
|
||||
env = environ.copy()
|
||||
sisoenv_path = os.path.join(base_path, 'build', 'config', 'siso',
|
||||
'.sisoenv')
|
||||
if os.path.exists(sisoenv_path):
|
||||
with open(sisoenv_path) as f:
|
||||
for line in f.readlines():
|
||||
k, v = line.rstrip().split('=', 1)
|
||||
env[k] = v
|
||||
if not os.path.exists(sisoenv_path):
|
||||
continue
|
||||
with open(sisoenv_path) as f:
|
||||
for line in f.readlines():
|
||||
k, v = line.rstrip().split('=', 1)
|
||||
env[k] = v
|
||||
siso_path = siso_override_path or os.path.join(
|
||||
base_path, 'third_party', 'siso', 'siso' + gclient_paths.GetExeSuffix())
|
||||
if os.path.isfile(siso_path):
|
||||
return subprocess.call([siso_path] + args[1:], env=env)
|
||||
|
||||
print(
|
||||
'depot_tools/siso.py: Could not find Siso in the third_party of '
|
||||
'the current project.',
|
||||
'depot_tools/siso.py: Could not find .sisoenv under build/config/siso of '
|
||||
'the current project. Did you run gclient sync?',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user