0

orderfile: Fix DEPS path

The DEPS file needs to be rooted in _clank_dir. Also remove
_GCLIENT_SETDEP_DIR since it is redundant.

Bug: 339222297
Change-Id: Ie3b783fa03f56efaf9a33ad5e6c5167b7bd885b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530164
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298822}
This commit is contained in:
Peter Wen
2024-05-09 20:01:14 +00:00
committed by Chromium LUCI CQ
parent 2eaec35ce3
commit f95d901b21

@ -370,7 +370,6 @@ class OrderfileUpdater:
_CLOUD_STORAGE_BUCKET_FOR_DEBUG = None
_CLOUD_STORAGE_BUCKET = None
_GCLIENT_SETDEP_DIR = _SRC_PATH
_UPLOAD_TO_CLOUD_COMMAND = 'upload_to_google_storage.py'
_UPLOAD_TO_NEW_CLOUD_COMMAND = 'upload_to_google_storage_first_class.py'
@ -436,8 +435,9 @@ class OrderfileUpdater:
logging.info(output_file)
# Load existing objects to avoid overwriting other arch's objects.
getdep_cmd = ['gclient', 'getdep', '-r', 'orderfiles']
dep_str: str = self._step_recorder.RunCommand(
getdep_cmd, cwd=self._GCLIENT_SETDEP_DIR, capture_output=True).stdout
dep_str: str = self._step_recorder.RunCommand(getdep_cmd,
cwd=self._repository_root,
capture_output=True).stdout
# dep_str is a python representation of the object, not valid JSON.
dep_objects = ast.literal_eval(dep_str)
values = []
@ -454,7 +454,7 @@ class OrderfileUpdater:
else:
values.append(",".join(map(str, dep_object.values())))
setdep_cmd = ['gclient', 'setdep', '-r', f'orderfiles@{"?".join(values)}']
self._step_recorder.RunCommand(setdep_cmd, cwd=self._GCLIENT_SETDEP_DIR)
self._step_recorder.RunCommand(setdep_cmd, cwd=self._repository_root)
print('Download: https://sandbox.google.com/storage/%s/%s' %
(bucket, _GenerateHash(filename)))
@ -1102,7 +1102,7 @@ class OrderfileGenerator:
]
if self._options.arch == 'arm64':
# DEPS is updated as well in the new cloud flow.
paths.append('DEPS')
paths.append(str(self._clank_dir / 'DEPS'))
self._orderfile_updater._CommitStashedFiles(paths)
return True