commit | f7b12e55187700ea510e1ada141f23c27e1b58be | [log] [tgz] |
---|---|---|
author | David 'Digit' Turner <digit@google.com> | Fri Jan 27 16:59:05 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 27 16:59:05 2023 +0000 |
tree | 4079a24339ded789804260a226d026c9c77a49e3 | |
parent | 95a2b48b692e83175917ecbbc4bbfd102b353130 [diff] |
Fix fuchsia_prebuilt_package() rule This fixes the implementation of the rule in several ways: - Use ctx.actions.declare_directory() to declare an output directory where all input .far archive content is extracted (using `pm expand`). This allows Bazel to track all these files properly, even if their names cannot be known in advance. In particular, if the command is run in a sandbox, all files are properly copied into the final output base location, instead of being removed at the end of the command. This also ensures that any Bazel target that depends on the `rebased_package_manifest.json` file will also see the content files it points to (see associated bug). Note however that this does not translate to GN unfortunately at the moment! - Simplify the _COMPONENT_VALIDATION_SCRIPT to directly read the meta.far file that was extracted by a previous action, instead of re-extracting the full prebuilt package archive (!) for any component or driver item to be validated. - Improve the same script to detect components using the `meta/${COMPONENT}.cm` fgrep pattern, to avoid false positives, which could happen trivially if the component name passed to fuchsia_prebuilt_package() was shorter than the ones found in the package (e.g. 'foo' would validate 'meta/foobar.cm' even though these do not correspond to the same component name). Bug: 120613 Change-Id: Icca4503d4ae8c74172ea3cbe437e88301950ed04 Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-integration/+/791984 Commit-Queue: David Turner <digit@google.com> Reviewed-by: Jiaming Li <lijiaming@google.com>
This repository provides environment-specific (e.g. Bazel, GN) tools for the SDK and associated integration tests in a public repo.
Visit Contributing to Fuchsia to learn how to contribute to this repository.