From 3ccda6e583221d1e36eee5e7a86d4a71ff795e63 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 30 Jan 2025 00:22:05 +0000 Subject: 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 --- filesystem/filesystem.go | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'filesystem/filesystem.go') 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 { -- cgit v1.2.3-59-g8ed1b