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
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index ad19cc6..6b3906a 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -701,7 +701,9 @@
 
 	// 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 @@
 		}
 		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, "/"))