drydock
is a tool for querying Portage profiles and producing useful diagnostic output. drydock
aims to demystify Portage configuration for users by providing fast queries of configuration values and detailed explanations of where those values came from.
drydock
aims to not only answer what a value set to, but where and how that is value defined.
Currently, drydock
does not interact with ebuilds at all and cannot evaluate package dependencies.
Run drydock --help
to see a list of all commands.
eval
Print the value of a variable as it would be seen by Portage. Example:
drydock eval USE --profile grunt:base
blame
Show the value of a variable annotated with details of where the contents of that variable are set throughout the profile hierarchy. Running the following example:
drydock blame BOARD_COMPILER_FLAGS --profile octopus:base
will output something similar to:
-march=goldmont ^______________^ chipset-glk/profiles/base/make.defaults:L14
Indicating the value of the BOARD_COMPILER_FLAGS
variable and where that value was set. In this case, line 14 of the make.defaults
file in the base
profile of the chipset-glk
overlay. (The exact value may have changed since this README was written.)
parents
Print a graphviz representation or text tree of a profile's inheritance tree. Example:
drydock parents --graph samus:base
Get started with drydock --help
to see a list of commands. If you're a Chrome OS developer you probably want to start with drydock config --default
to generate a default configuration file.
By default drydock
tries to read from a configuration file under $XDG_CONFIG_HOME
or ~/.config/drydock
, but the config file path can be specified with the --config-file
argument. All drydock
settings can be specified as command-line arguments in addition to the configuration file, check drydock --help
or drydock <subcmd> --help
for more details.
drydock
requires a stable Rust toolchain, best obtained via https://rustup.rs/
You can install drydock
via cargo
by running
cargo install --path ${DRYDOCK_CHECKOUT_DIR?}
drydock
can be built by running
cargo build --release
while in the project directory. The output binary can then be found at target/release/drydock
and can be moved to the location of your choosing.
drydock
can also be compiled and run directly from the project directory via
cargo run --release -- ${YOUR_ARGS?}
drydock
fully supports being built via Bazel.
To run drydock
's test suite via Bazel, run bazel test :all
from your drydock
checkout.
To build an optimized version of the drydock
binary suitable for installation, run bazel build :drydock -c opt
from within your drydock checkout. The binary can then be found at bazel-bin/drydock
.