Skip to content

cvd: start and bugreport help works everywhere#2517

Merged
jemoreira merged 4 commits intogoogle:mainfrom
jemoreira:internalbins
May 8, 2026
Merged

cvd: start and bugreport help works everywhere#2517
jemoreira merged 4 commits intogoogle:mainfrom
jemoreira:internalbins

Conversation

@jemoreira
Copy link
Copy Markdown
Member

Both commands rely on cvd_internal_start and cvd_internal_host_bugreport for their help output. Those executables are searched for in $ANDROID_HOST_OUT/bin, $HOME/bin and ./bin, which means the command's help only works after building cuttlefish from source or downloading an android build from the server.

This PR makes cvd use the internal binaries it uses for executable substitution, which are located in the same directory where cvd is.

Bug: b/510047667

@jemoreira jemoreira requested a review from Databean May 5, 2026 23:08
Comment thread base/cvd/cuttlefish/host/libs/config/config_flag.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/config/config_flag.cpp Outdated
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/utils.cpp Outdated
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/utils.cpp Outdated
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/commands/bugreport.cpp
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/commands/start.cpp
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/commands/start.cpp
Comment thread base/cvd/cuttlefish/host/commands/cvd/cli/commands/bugreport.cpp
jemoreira added 4 commits May 7, 2026 14:51
Treat not finding cvd config as a non-fatal error.

Delay finding android builds until after the help flags are handled.
The cvd start and bugreport subcommands call their cvd_internal_
counterpart with the --help flag when handling their own help flags.

Given that:
* The help command may run before host binaries are substituted (for
  example, after a new local build)
* Host binaries are substituted more often than not
* Flags reported by older versions of the internal bugreport and start
  binaries are a subset of the ones supported by the current ones
The binaries from the cvd package are always used for help output.

This change doesn't apply to `cvd env --help` because the internal env
binary has not been migrated yet.
cvd_internal_start and cvd_internal_host_bugreport print a few logs that
end up in stderr but add no value to the help output. The corresponding
cvd commands drop this output when help works and print it only if the
internal command fails.
@jemoreira jemoreira requested a review from Databean May 7, 2026 22:00
@jemoreira jemoreira enabled auto-merge May 7, 2026 22:14
@jemoreira jemoreira added the kokoro:force-run Trigger a presubmit build unconditionally. label May 8, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label May 8, 2026
@jemoreira jemoreira added this pull request to the merge queue May 8, 2026
Merged via the queue into google:main with commit 5e597e2 May 8, 2026
112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants