diff options
author | 2024-04-30 21:24:21 +0900 | |
---|---|---|
committer | 2024-04-30 22:35:20 +0900 | |
commit | 4152b192e09d27fdb801a89d47c22ff2a19779b7 (patch) | |
tree | 0e1fbeaf73c34465c0dc29f9fc282280b3ec597f /android/module_context.go | |
parent | 5c3c3274fe0069a8cd654392d486f3ee821d146d (diff) |
Distinguish the intent of PackagingSpec
A PackagingSpec actually means either of two: an installation of a file
(i.e. putting the file on a filesystem image), or a simple gathering.
However, so far, the two different intents was not visible in
PackagingSpecs returns from TransitivePackagingSpecs().
With this change, the two different intents are recorded in
PackagingSpec. A PackagingSpec has a boolean field which records the
value of the SkipInstall() of the module where the PackagingSpec was
created from.
This could be used by a module like android_system_image which wants to
follow the "installation" semantic. For example, the module type doesn't
want to include a stub variant of a shared lib.
This change doesn't make use of the new field, yet.
Bug: 335506668
Test: go test ./...
Change-Id: If0106642a11ba804630df79b4c5ebd608a77a6b1
Diffstat (limited to 'android/module_context.go')
-rw-r--r-- | android/module_context.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/android/module_context.go b/android/module_context.go index d3e2770cb..dea22bab4 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -476,6 +476,7 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e executable: executable, effectiveLicenseFiles: &licenseFiles, partition: fullInstallPath.partition, + skipInstall: m.skipInstall(), } m.packagingSpecs = append(m.packagingSpecs, spec) return spec @@ -599,6 +600,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src symlinkTarget: relPath, executable: false, partition: fullInstallPath.partition, + skipInstall: m.skipInstall(), }) return fullInstallPath @@ -640,6 +642,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str symlinkTarget: absPath, executable: false, partition: fullInstallPath.partition, + skipInstall: m.skipInstall(), }) return fullInstallPath |