diff options
author | 2024-08-28 18:06:43 +0900 | |
---|---|---|
committer | 2024-09-02 19:58:38 +0900 | |
commit | a574d535b50ed5f01162dddd3bfbfa495dcba876 (patch) | |
tree | f7a333b8617563c2091d42db7ef957143253c461 /android/module_context.go | |
parent | f2d6e5004f1a1fc3eadef6f90a2bbb632e8f2430 (diff) |
Make overrides work in Soong
This change adds `overrides` property to all module types. It is used
to prevent another module (or modules) from being installed or packaged.
Bug: 330141242
Test: go test ./...
Change-Id: I4f05c603f0c5dbb699d00327882c7498472b59de
Diffstat (limited to 'android/module_context.go')
-rw-r--r-- | android/module_context.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/android/module_context.go b/android/module_context.go index 5322240e5..b69aa29a6 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -522,6 +522,7 @@ func (m *moduleContext) getAconfigPaths() *Paths { func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, executable bool) PackagingSpec { licenseFiles := m.Module().EffectiveLicenseFiles() + overrides := CopyOf(m.Module().base().commonProperties.Overrides) spec := PackagingSpec{ relPathInPackage: Rel(m, fullInstallPath.PartitionDir(), fullInstallPath.String()), srcPath: srcPath, @@ -532,6 +533,8 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, + overrides: &overrides, + owner: m.ModuleName(), } m.packagingSpecs = append(m.packagingSpecs, spec) return spec @@ -649,6 +652,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src m.checkbuildFiles = append(m.checkbuildFiles, srcPath) } + overrides := CopyOf(m.Module().base().commonProperties.Overrides) m.packagingSpecs = append(m.packagingSpecs, PackagingSpec{ relPathInPackage: Rel(m, fullInstallPath.PartitionDir(), fullInstallPath.String()), srcPath: nil, @@ -658,6 +662,8 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, + overrides: &overrides, + owner: m.ModuleName(), }) return fullInstallPath @@ -693,6 +699,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str m.installFiles = append(m.installFiles, fullInstallPath) } + overrides := CopyOf(m.Module().base().commonProperties.Overrides) m.packagingSpecs = append(m.packagingSpecs, PackagingSpec{ relPathInPackage: Rel(m, fullInstallPath.PartitionDir(), fullInstallPath.String()), srcPath: nil, @@ -702,6 +709,8 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), archType: m.target.Arch.ArchType, + overrides: &overrides, + owner: m.ModuleName(), }) return fullInstallPath |