summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2025-01-08 01:59:48 +0000
committer Jihoon Kang <jihoonkang@google.com> 2025-01-08 23:56:46 +0000
commite90cebec929b320d7d7315c90906bd8167574bd8 (patch)
tree3baba000918e8f86475b183b8035d8857386127e /filesystem/filesystem.go
parent9e0870033f919dda208b44aa5b7ec596ced99504 (diff)
Update $PRODUCT_OUT for auto generated partitions
This change allows the auto generated filesystem modules to copy the installed files to $PRODUCT_OUT, on top of the currently allowed soong defined system image. Also, this change replaces the cp command with rsync, to prevent identical files from being copied in incremental builds. Test: rm -rf out/ && m aosp_cf_x86_64_phone_generated_device --soong-only Bug: 376727180 Change-Id: I68c6319aad99358648aefa35a6acea8644100875
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 4027b9a79..ae39efb38 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -593,11 +593,11 @@ func (f *filesystem) copyPackagingSpecs(ctx android.ModuleContext, builder *andr
}
func (f *filesystem) copyFilesToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) {
- if f.Name() != ctx.Config().SoongDefinedSystemImage() {
+ if !(f.Name() == ctx.Config().SoongDefinedSystemImage() || proptools.Bool(f.properties.Is_auto_generated)) {
return
}
installPath := android.PathForModuleInPartitionInstall(ctx, f.partitionName())
- builder.Command().Textf("cp -prf %s/* %s", rebasedDir, installPath)
+ builder.Command().Textf("rsync --checksum %s %s", rebasedDir, installPath)
}
func copyImageFileToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, partition string, output android.Path) {