summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-01-17 20:11:35 +0000
committer Spandan Das <spandandas@google.com> 2025-01-17 20:28:54 +0000
commit0c1a68b511ada4997e1db607087adebe6ea8abfd (patch)
tree13558293cf4ad9b6761bf3165b99b33f18e46905 /filesystem/filesystem.go
parent315e7e84a2f4cf6b8c909d51fe169e65bce451a4 (diff)
Generate block_list only when building img for target_files.zip
The same block_list file is currently declared in the propfile of primary .img file as well the secondary .img file (for target_files.zip). Both the .img files are created in the same ninja command, but in the current implementation the block_list file is generated twice with the same contents. This CL moves the block_list file to the image prop file of the secondary .img creation. Test: presubmits Change-Id: I0f8f4e4c7bec1ae5e370ac97d6608f9754e719e3
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index ad19cc6e0..6b3906a92 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -701,7 +701,9 @@ func (f *filesystem) buildImageUsingBuildImage(
// Add an additional cmd to create a hermetic img file. This will contain pinned timestamps e.g.
propFilePinnedTimestamp := android.PathForModuleOut(ctx, "for_target_files", "prop")
- builder.Command().Textf("cat").Input(propFile).Flag(">").Output(propFilePinnedTimestamp).Textf(" && echo use_fixed_timestamp=true >> %s", propFilePinnedTimestamp)
+ builder.Command().Textf("cat").Input(propFile).Flag(">").Output(propFilePinnedTimestamp).
+ Textf(" && echo use_fixed_timestamp=true >> %s", propFilePinnedTimestamp).
+ Textf(" && echo block_list=%s >> %s", f.getMapFile(ctx).String(), propFilePinnedTimestamp) // mapfile will be an implicit output
outputHermetic := android.PathForModuleOut(ctx, "for_target_files", f.installFileName())
builder.Command().
@@ -761,7 +763,6 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and
}
panic(fmt.Errorf("unsupported fs type %v", t))
}
- addStr("block_list", f.getMapFile(ctx).String()) // This will be an implicit output
addStr("fs_type", fsTypeStr(f.fsType(ctx)))
addStr("mount_point", proptools.StringDefault(f.properties.Mount_point, "/"))