diff options
author | 2025-01-14 21:55:08 +0000 | |
---|---|---|
committer | 2025-01-14 22:38:04 +0000 | |
commit | 40551e648fdc89fb485ef8e5c1145d232dc6c6d0 (patch) | |
tree | 2b22e12498d73d4754e4c3051bf5a31a55e586f5 /filesystem/filesystem.go | |
parent | c28395fd75c884fa6b84a14256ca496bc8c94557 (diff) |
Disable sparse only when partition_size is undefined.
Currently, filesystem module automatically adds `disable_sparse` entry
when generating the prop file. However, this property should not be
added when partition_size is specified, given that partition_size
property is introduced in filesystem module with
https://r.android.com/3451348.
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_userdata_image/android_common/userdata.img
Bug: 388920173
Change-Id: Ia86210be77284c71f3831464149789b934c55001
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 38808463e..85facee1f 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -798,12 +798,11 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and addStr("hash_seed", uuid) } - // TODO(b/381120092): This should only be added if none of the size-related properties are set, - // but currently soong built partitions don't have size properties. Make code: - // https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/Makefile;l=2262;drc=39cd33701c9278db0e7e481a090605f428d5b12d - // Make uses system_disable_sparse but disable_sparse has the same effect, and we shouldn't need - // to qualify it because each partition gets its own property file built. - addStr("disable_sparse", "true") + // Disable sparse only when partition size is not defined. disable_sparse has the same + // effect as <partition name>_disable_sparse. + if f.properties.Partition_size == nil { + addStr("disable_sparse", "true") + } fst := f.fsType(ctx) switch fst { |