aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs
diff options
context:
space:
mode:
authorLaura Peskin <pesk@google.com>2024-12-04 14:42:03 -0800
committerglpesk <114444708+glpesk@users.noreply.github.com>2024-12-09 23:45:06 +0000
commitcfc402b4e65a6aab3a2555765bda8dc12c99a348 (patch)
treeaa696fede2c4bbd299358259f77e1bc60ab0e8c7 /pkg/vcs
parente4d2aef70c48cbcb4173a30dafbb51e6878c8b8e (diff)
pkg/vcs: work around bug in jiri prebuilt_versions hook
Invoke `jiri update` twice (once from the fuchsia bootstrap script, then as a standalone command) when initializing a new fuchsia checkout.
Diffstat (limited to 'pkg/vcs')
-rw-r--r--pkg/vcs/fuchsia.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/vcs/fuchsia.go b/pkg/vcs/fuchsia.go
index a50076147..3f6983f3b 100644
--- a/pkg/vcs/fuchsia.go
+++ b/pkg/vcs/fuchsia.go
@@ -59,7 +59,11 @@ func (ctx *fuchsia) initRepo() error {
}
cmd := "curl -s 'https://fuchsia.googlesource.com/fuchsia/+/main/scripts/bootstrap?format=TEXT' |" +
"base64 --decode | bash"
- if _, err := runSandboxed(tmpDir, "bash", "-c", cmd); err != nil {
+ // TODO: Remove the second `jiri update` once the `prebuilt_versions` hook is fixed.
+ // Expect and ignore an error from the bootstrap script's invocation of `jiri update`.
+ _, _ = runSandboxed(tmpDir, "bash", "-c", cmd)
+ // Run `jiri update` a second time; it should succeed.
+ if _, err := runSandboxed(filepath.Join(tmpDir, "fuchsia"), "./.jiri_root/bin/jiri", "update"); err != nil {
return err
}
return osutil.Rename(filepath.Join(tmpDir, "fuchsia"), ctx.dir)