Install apex symbol file
This is a partial revert of aosp/3308088. We need the symbol file
to still be installed, because a later ctx.InstallSymlink file adds
a dependency on the it.
We removed that install initially so that it didn't get installed in
filesystems, to replace that, just exclude files installed to the
"apex" partition from filesystems.
Bug: 393617060
Test: cd bionic; mm
Change-Id: Id4abe966c630d1e356575386af233eab92849934
diff --git a/apex/builder.go b/apex/builder.go
index b317472..3f2623e 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -603,7 +603,7 @@
} else {
if installSymbolFiles {
// store installedPath. symlinks might be created if required.
- installedPath = apexDir.Join(ctx, fi.installDir, fi.stem())
+ installedPath = ctx.InstallFile(apexDir.Join(ctx, fi.installDir), fi.stem(), fi.builtFile)
}
}
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index e3f3ce8..6606037 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -469,6 +469,13 @@
if ps.SkipInstall() {
return false
}
+ // "apex" is a fake partition used to install files in out/target/product/<device>/apex/.
+ // Don't include these files in the partition. We should also look into removing the following
+ // TODO to check the PackagingSpec's partition against this filesystem's partition for all
+ // modules, not just autogenerated ones, which will fix this as well.
+ if ps.Partition() == "apex" {
+ return false
+ }
if proptools.Bool(f.properties.Is_auto_generated) { // TODO (spandandas): Remove this.
pt := f.PartitionType()
return ps.Partition() == pt || strings.HasPrefix(ps.Partition(), pt+"/")