summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2024-12-11 18:10:52 +0000
committer Spandan Das <spandandas@google.com> 2024-12-11 13:55:29 -0800
commit420e16a5d5abbbc77cbe15237472522f9ba8e4ab (patch)
tree7ad78e32e5f59bdf391fca8588c4aeee82726cd0 /filesystem/filesystem.go
parentf7bbd2fe40e43f7fda7e08d08eeb9c2a93552ad9 (diff)
Reapply "Use partition intead of "root" to assemble filesystem artifacts"
This reverts commit 135904463f96f81bd7ef7696569b02ebb61c8195. The revert will be applied alongside a change in build/make that ensures that the correct intermediates dir for aosp_shared_system_image is packged into target_files.zip Test: Previously failing OTA test now passes https://android-build.corp.google.com/builds/abtd/run/L04100030008317770 Change-Id: Ibdf3ae42348ec5840dcada8ce3182f87d4619cac
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 1d32b8f70..b7a3adc8b 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -465,7 +465,7 @@ func (f *filesystem) validateVintfFragments(ctx android.ModuleContext) {
}
func (f *filesystem) appendToEntry(ctx android.ModuleContext, installedFile android.Path) {
- partitionBaseDir := android.PathForModuleOut(ctx, "root", proptools.String(f.properties.Base_dir)).String() + "/"
+ partitionBaseDir := android.PathForModuleOut(ctx, f.rootDirString(), proptools.String(f.properties.Base_dir)).String() + "/"
relPath, inTargetPartition := strings.CutPrefix(installedFile.String(), partitionBaseDir)
if inTargetPartition {
@@ -555,8 +555,12 @@ func (f *filesystem) copyFilesToProductOut(ctx android.ModuleContext, builder *a
builder.Command().Textf("cp -prf %s/* %s", rebasedDir, installPath)
}
+func (f *filesystem) rootDirString() string {
+ return f.partitionName()
+}
+
func (f *filesystem) buildImageUsingBuildImage(ctx android.ModuleContext) android.Path {
- rootDir := android.PathForModuleOut(ctx, "root").OutputPath
+ rootDir := android.PathForModuleOut(ctx, f.rootDirString()).OutputPath
rebasedDir := rootDir
if f.properties.Base_dir != nil {
rebasedDir = rootDir.Join(ctx, *f.properties.Base_dir)
@@ -783,7 +787,7 @@ func (f *filesystem) buildCpioImage(ctx android.ModuleContext, compressed bool)
ctx.PropertyErrorf("include_make_built_files", "include_make_built_files is not supported for compressed cpio image.")
}
- rootDir := android.PathForModuleOut(ctx, "root").OutputPath
+ rootDir := android.PathForModuleOut(ctx, f.rootDirString()).OutputPath
rebasedDir := rootDir
if f.properties.Base_dir != nil {
rebasedDir = rootDir.Join(ctx, *f.properties.Base_dir)