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 diff --git a/android/packaging.go b/android/packaging.go index a8fb28d30..66772183c 100644 --- a/android/packaging.go +++ b/android/packaging.go @@ -43,6 +43,11 @@ type PackagingSpec struct { effectiveLicenseFiles *Paths partition string + + // Whether this packaging spec represents an installation of the srcPath (i.e. this struct + // is created via InstallFile or InstallSymlink) or a simple packaging (i.e. created via + // PackageFile). + skipInstall bool } // Get file name of installed package @@ -74,6 +79,10 @@ func (p *PackagingSpec) Partition() string { return p.partition } +func (p *PackagingSpec) SkipInstall() bool { + return p.skipInstall +} + type PackageModule interface { Module packagingBase() *PackagingBase