diff options
author | Alex Light <allight@google.com> | 2019-02-04 14:45:06 -0800 |
---|---|---|
committer | Alex Light <allight@google.com> | 2019-02-07 17:05:45 +0000 |
commit | f98087ffce4e435ed2738c423c3d57435b6c016b (patch) | |
tree | 0481bd7ce3a8bb17ec780ef0d2a6a240e274fae8 /apex | |
parent | 6e8fe6feb16ee95187d37cfe8084d46290f0e826 (diff) | |
download | build_soong-f98087ffce4e435ed2738c423c3d57435b6c016b.tar.gz build_soong-f98087ffce4e435ed2738c423c3d57435b6c016b.tar.bz2 build_soong-f98087ffce4e435ed2738c423c3d57435b6c016b.zip |
Don't remove non-installable apex deps from the system install
We were marking any libraries included in any apex (including
non-installable apex's like com.android.runtime.host) as
uninstallable. This could cause phones to become unbootable if these
apex's are modified.
Bug: 123892969
Test: m droid && boot device.
Change-Id: Ief9004bbe7b106ee8f52715ce5bd7bb5accec290
Diffstat (limited to 'apex')
-rw-r--r-- | apex/apex.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apex/apex.go b/apex/apex.go index d25c256c..06e6c784 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -147,13 +147,18 @@ func init() { // Mark the direct and transitive dependencies of apex bundles so that they // can be built for the apex bundles. func apexDepsMutator(mctx android.TopDownMutatorContext) { - if _, ok := mctx.Module().(*apexBundle); ok { + if a, ok := mctx.Module().(*apexBundle); ok { apexBundleName := mctx.ModuleName() mctx.WalkDeps(func(child, parent android.Module) bool { depName := mctx.OtherModuleName(child) // If the parent is apexBundle, this child is directly depended. _, directDep := parent.(*apexBundle) - android.UpdateApexDependency(apexBundleName, depName, directDep) + if a.installable() { + // TODO(b/123892969): Workaround for not having any way to annotate test-apexs + // non-installable apex's cannot be installed and so should not prevent libraries from being + // installed to the system. + android.UpdateApexDependency(apexBundleName, depName, directDep) + } if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() { am.BuildForApex(apexBundleName) |