From c88cff15e034771ecd507c6729db16cd7d1d26b2 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 12 Nov 2024 13:24:05 -0800 Subject: Make ModifyPackagingSpec generic to any filesystem ModifyPackagingSpec was added to support installing product-partition modules on the system partition for GSI, but ramdisk also has a very similar issue, where it's modules are installed to the "ramdisk/system" partition. Make ModifyPackagingSpec generic so that it works on the ramdisk files. This reduces the ramdisk file diff down to just a missing build.prop file. Bug: 378146476 Test: m soong_generated_ramdisk_filesystem_test on aosp_cf_x86_64_phone Change-Id: I1d197679a1128400b6bb837d99e3aabe2ab3c68e --- filesystem/system_image.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'filesystem/system_image.go') diff --git a/filesystem/system_image.go b/filesystem/system_image.go index 4d176ae45..d03eab45b 100644 --- a/filesystem/system_image.go +++ b/filesystem/system_image.go @@ -18,7 +18,6 @@ import ( "android/soong/android" "android/soong/linkerconfig" - "path/filepath" "strings" "github.com/google/blueprint/proptools" @@ -64,11 +63,3 @@ func (s *systemImage) FilterPackagingSpec(ps android.PackagingSpec) bool { (ps.Partition() == "system" || ps.Partition() == "root" || strings.HasPrefix(ps.Partition(), "system/")) } - -func (s *systemImage) ModifyPackagingSpec(ps *android.PackagingSpec) { - if strings.HasPrefix(ps.Partition(), "system/") { - subPartition := strings.TrimPrefix(ps.Partition(), "system/") - ps.SetPartition("system") - ps.SetRelPathInPackage(filepath.Join(subPartition, ps.RelPathInPackage())) - } -} -- cgit v1.2.3-59-g8ed1b