Correct bp2build canonical_from_root logic

The logic was inverted from what it should have been,
canonical_from_root --> no strip_import_prefix attribute.

Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_droid.sh
Change-Id: Ic6685d8f0b88279d4444bab3b5e03a544d225f77
This commit is contained in:
Liz Kammer
2022-02-14 20:49:15 -05:00
parent 104ecf6708
commit 7756c8f20e
5 changed files with 5 additions and 17 deletions

View File

@@ -187,7 +187,7 @@ func Bp2buildProtoProperties(ctx Bp2buildMutatorContext, module Module, srcs baz
if axis == bazel.NoConfigAxis {
info.Type = props.Proto.Type
if proptools.BoolDefault(props.Proto.Canonical_path_from_root, canonicalPathFromRootDefault) {
if !proptools.BoolDefault(props.Proto.Canonical_path_from_root, canonicalPathFromRootDefault) {
// an empty string indicates to strips the package path
path := ""
attrs.Strip_import_prefix = &path