Include symlinks in flattened apexs
Flattened apexs were not including symlinks. This could cause expected
files not to be present.
Test: lunch aosp_marlin-userdebug
m droid
stat $OUT/system/apex/com.android.runtime.debug/bin/dalvikvm
Bug: 124924906
Change-Id: I04e696602b776b383bf7198eb19220353df74192
diff --git a/apex/apex.go b/apex/apex.go
index 8f89ca6..9ab5187 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1006,7 +1006,10 @@
if ctx.Config().FlattenApex() {
for _, fi := range a.filesInfo {
dir := filepath.Join("apex", ctx.ModuleName(), fi.installDir)
- ctx.InstallFile(android.PathForModuleInstall(ctx, dir), fi.builtFile.Base(), fi.builtFile)
+ target := ctx.InstallFile(android.PathForModuleInstall(ctx, dir), fi.builtFile.Base(), fi.builtFile)
+ for _, sym := range fi.symlinks {
+ ctx.InstallSymlink(android.PathForModuleInstall(ctx, dir), sym, target)
+ }
}
}
}
@@ -1045,6 +1048,9 @@
// /system/apex/<name>/{lib|framework|...}
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(OUT_DIR)",
a.installDir.RelPathString(), name, fi.installDir))
+ if len(fi.symlinks) > 0 {
+ fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS :=", strings.Join(fi.symlinks, " "))
+ }
} else {
// /apex/<name>/{lib|framework|...}
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(PRODUCT_OUT)",