aboutsummaryrefslogtreecommitdiffstats
path: root/bpfix
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2018-02-28 14:07:56 -0500
committerJeff Gaston <jeffrygaston@google.com>2018-02-28 15:00:15 -0500
commitf7542544d2544597d36d80bcc22f610f3a41a03b (patch)
treeda786bd1eb12a518b9534723566a720b1b875437 /bpfix
parent0c74ad9381e33545e77596dd0e9208e5e215eae8 (diff)
downloadbuild_soong-f7542544d2544597d36d80bcc22f610f3a41a03b.tar.gz
build_soong-f7542544d2544597d36d80bcc22f610f3a41a03b.tar.bz2
build_soong-f7542544d2544597d36d80bcc22f610f3a41a03b.zip
Remove unused property
Bug: 72552085 Test: androidmk prebuilts/sdk/current/support/Android.mk \ | grep LOCAL_UNINSTALLABLE_MODULE && echo failed Change-Id: Idcdd571812594599267985dfef2cc2fc6efbb5ba
Diffstat (limited to 'bpfix')
-rw-r--r--bpfix/bpfix/bpfix.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpfix/bpfix/bpfix.go b/bpfix/bpfix/bpfix.go
index 2358f0cf..84454907 100644
--- a/bpfix/bpfix/bpfix.go
+++ b/bpfix/bpfix/bpfix.go
@@ -130,6 +130,9 @@ func rewriteIncorrectAndroidmkPrebuilts(tree *parser.File) error {
case ".aar":
renameProperty(mod, "srcs", "aars")
mod.Type = "android_library_import"
+
+ // An android_library_import doesn't get installed, so setting "installable = false" isn't supported
+ removeProperty(mod, "installable")
}
}
@@ -195,3 +198,13 @@ func renameProperty(mod *parser.Module, from, to string) {
}
}
}
+
+func removeProperty(mod *parser.Module, propertyName string) {
+ newList := make([]*parser.Property, 0, len(mod.Properties))
+ for _, prop := range mod.Properties {
+ if prop.Name != propertyName {
+ newList = append(newList, prop)
+ }
+ }
+ mod.Properties = newList
+}