summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-10 20:16:07 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-12-10 20:16:07 +0000
commit3747221ade705fbd54cd575a53d060f22de38b0d (patch)
treeb289d05a674fbd06b82dc08d216c555ba81cf7fa /filesystem/filesystem.go
parentad6918499ca4094acc5906f01572cd02116f0c53 (diff)
parent95db4499428f421571819699d92581e7422e7659 (diff)
Merge "Use partition intead of "root" to assemble filesystem artifacts" into main
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 cd3808c56..9ad2cc9bc 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -457,7 +457,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 {
@@ -547,8 +547,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)
@@ -775,7 +779,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)