mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Override cipd install mode for runhooks
Currently cipd packages listed in src/DEPS are being created and installed in symlink mode (see bug for more info). This CL adds `$OverrideInstallMode copy` to the ensure files for cipd packages installed during gclient runhooks. `$OverrideInstallMode` was implemented here, https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3124202, so that every cipd package can be installed directly to the installation target, instead of being symlinked to an executable inside the cache/builder/.cipd dir. The added `$OverrideInstallMode copy` can be removed once all cipd packages themselves or the default mode is updated to be created in copy mode. Bug: 1329641 Change-Id: I68dc718e20f193c384d005c9b6b87603753943d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3673698 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
This commit is contained in:
@@ -1542,7 +1542,10 @@ class CipdRoot(object):
|
||||
@contextlib.contextmanager
|
||||
def _create_ensure_file(self):
|
||||
try:
|
||||
contents = '$ParanoidMode CheckPresence\n\n'
|
||||
contents = '$ParanoidMode CheckPresence\n'
|
||||
# TODO(crbug/1329641): Remove once cipd packages have been updated
|
||||
# to always be created in copy mode.
|
||||
contents += '$OverrideInstallMode copy\n\n'
|
||||
for subdir, packages in sorted(self._packages_by_subdir.items()):
|
||||
contents += '@Subdir %s\n' % subdir
|
||||
for package in sorted(packages, key=lambda p: p.name):
|
||||
|
||||
@@ -35,6 +35,7 @@ class GClientSmokeCipd(gclient_smoketest_base.GClientSmokeBase):
|
||||
tree.update({
|
||||
'_cipd': '\n'.join([
|
||||
'$ParanoidMode CheckPresence',
|
||||
'$OverrideInstallMode copy',
|
||||
'',
|
||||
'@Subdir src/another_cipd_dep',
|
||||
'package1 1.1-cr0',
|
||||
@@ -77,6 +78,7 @@ class GClientSmokeCipd(gclient_smoketest_base.GClientSmokeBase):
|
||||
tree.update({
|
||||
'_cipd': '\n'.join([
|
||||
'$ParanoidMode CheckPresence',
|
||||
'$OverrideInstallMode copy',
|
||||
'',
|
||||
'@Subdir src/repo12',
|
||||
'foo 1.3',
|
||||
@@ -99,6 +101,7 @@ class GClientSmokeCipd(gclient_smoketest_base.GClientSmokeBase):
|
||||
tree.update({
|
||||
'_cipd': '\n'.join([
|
||||
'$ParanoidMode CheckPresence',
|
||||
'$OverrideInstallMode copy',
|
||||
'',
|
||||
'@Subdir src/repo12',
|
||||
'foo 1.3',
|
||||
@@ -118,6 +121,7 @@ class GClientSmokeCipd(gclient_smoketest_base.GClientSmokeBase):
|
||||
tree.update({
|
||||
'_cipd': '\n'.join([
|
||||
'$ParanoidMode CheckPresence',
|
||||
'$OverrideInstallMode copy',
|
||||
'',
|
||||
'@Subdir src/repo12',
|
||||
'foo 1.3',
|
||||
|
||||
Reference in New Issue
Block a user