Correct toolchain and kernel headers detection

cos-gpu-installer:v2 used to detect whether
/build/cos-tools is empty to find if toolchain
has already been installed. However, newer versions
of the installer require toolchain and kernel headers
to link GPU drivers. That directory will not be empty
if only one of toolchain and kernel headers exist.
In that case, installation will fail.

This CL changes the way installer detects the
required parts. The installer now detects and
installs toolchain and kernel headers separately. If
only one of the two is present, the installer will go
on to download and install the other one.

BUG=b/214429381

Change-Id: I5ee2af99b2bf48d451b7df5a5cba1dc2f2c32b3a
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/27760
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: He Gao <hegao@google.com>
1 file changed
tree: 3eabb2d7efd2460bbc02ba2c9e0956d3ec719858
  1. release/
  2. src/
  3. testing/
  4. BUILD.bazel
  5. cloudbuild.yaml
  6. CONTRIBUTING.md
  7. deps.bzl
  8. go.mod
  9. go.sum
  10. LICENSE
  11. README.md
  12. run_tests.sh
  13. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.