summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-01-30 00:22:05 +0000
committer Spandan Das <spandandas@google.com> 2025-01-30 00:26:53 +0000
commit3ccda6e583221d1e36eee5e7a86d4a71ff795e63 (patch)
treefa9ce547691860317243a649afce7b2af8591e92 /filesystem/filesystem.go
parentdc81dfea7aa01fb1995d4de70a67852db82f07ad (diff)
Disable target_files.zip generation in soong-only builds
The current implementation chains the non-hermetic and hermetic file creation in a single cmd. This causes `m droid` in --soong-only to do some redundant work. Since the hermetic file is used in target_files.zip, and this file is currently not fully migrated to soong builds, comment this out for now. Test: Set PRODUCT_SOONG_ONLY locally Test: m droid Bug: 393203512 Change-Id: Iff3a6a553922533c58b3d0206898bd627281c3fb
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go33
1 files changed, 17 insertions, 16 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 357ec32ba..815113ea3 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -738,22 +738,23 @@ func (f *filesystem) buildImageUsingBuildImage(
Output(output).
Text(rootDir.String()) // directory where to find fs_config_files|dirs
+ // TODO (b/393203512): Re-enable hermetic img file creation for target_files.zip
// 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).
- 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().
- Textf("PATH=%s:$PATH", strings.Join(pathToolDirs, ":")).
- BuiltTool("build_image").
- Text(rootDir.String()). // input directory
- Flag(propFilePinnedTimestamp.String()).
- Implicits(toolDeps).
- Implicit(fec).
- Output(outputHermetic).
- Text(rootDir.String()) // directory where to find fs_config_files|dirs
+ //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).
+ // 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().
+ // Textf("PATH=%s:$PATH", strings.Join(pathToolDirs, ":")).
+ // BuiltTool("build_image").
+ // Text(rootDir.String()). // input directory
+ // Flag(propFilePinnedTimestamp.String()).
+ // Implicits(toolDeps).
+ // Implicit(fec).
+ // Output(outputHermetic).
+ // Text(rootDir.String()) // directory where to find fs_config_files|dirs
if f.properties.Partition_size != nil {
assertMaxImageSize(builder, output, *f.properties.Partition_size, false)
@@ -762,7 +763,7 @@ func (f *filesystem) buildImageUsingBuildImage(
// rootDir is not deleted. Might be useful for quick inspection.
builder.Build("build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
- return output, outputHermetic, propFile, toolDeps
+ return output, nil, propFile, toolDeps
}
func (f *filesystem) buildFileContexts(ctx android.ModuleContext) android.Path {