nathanwilliams-ct opened a new pull request, #2147:
URL: https://github.com/apache/buildstream/pull/2147
This enables users to add additional functionality such as debug tooling in
the shell sandbox,
without needing to modify the target element. This is achived through
introducing a new option to
shell.
All existing API and UX is maintained, to not break existing scripts. An
alternative design was
considered, to have the additional elements as positional arguments similar
to the existing element,
but this would need manual parsing to handle the cases where `--` is present
and not
present, splitting based on a `.bst` suffix. This UX could be re-visited in
future.
Example usage:
bst shell --with base.bst example.bst -- cat example.txt
Where:
- example.bst is a simple import element with no dependencies that imports a
file called example.txt
- base.bst provides a basic alpine sysroot with a standard set of unix
tooling (sh, df, cat etc).
Changes:
- Introduces `test_with_other_targets` integration test to the shell test
suite.
- Adds `--with` cli option to the shell subcommand and updates it's
documentation.
- option can be used multiple times by caller, providing a list of targets.
- Extends the shell top level calling interface in Buildstream core to
accept a list of
other_targets
- This is where the targets are loaded into elements and checked to make
sure they are present
- Extends the shell element implementation to accept a list of other targets
- This is where the other elements are staged and integrated into the
sandbox
towards: #422+s
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]