Distinguish the intent of PackagingSpec am: 4152b192e0

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3066747

Change-Id: Idd79b2cd375a16bcf024a470b6a8d310362d7b79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jiyong Park
2024-04-30 17:54:19 +00:00
committed by Automerger Merge Worker
2 changed files with 12 additions and 0 deletions

View File

@@ -476,6 +476,7 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e
executable: executable, executable: executable,
effectiveLicenseFiles: &licenseFiles, effectiveLicenseFiles: &licenseFiles,
partition: fullInstallPath.partition, partition: fullInstallPath.partition,
skipInstall: m.skipInstall(),
} }
m.packagingSpecs = append(m.packagingSpecs, spec) m.packagingSpecs = append(m.packagingSpecs, spec)
return spec return spec
@@ -599,6 +600,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src
symlinkTarget: relPath, symlinkTarget: relPath,
executable: false, executable: false,
partition: fullInstallPath.partition, partition: fullInstallPath.partition,
skipInstall: m.skipInstall(),
}) })
return fullInstallPath return fullInstallPath
@@ -640,6 +642,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str
symlinkTarget: absPath, symlinkTarget: absPath,
executable: false, executable: false,
partition: fullInstallPath.partition, partition: fullInstallPath.partition,
skipInstall: m.skipInstall(),
}) })
return fullInstallPath return fullInstallPath

View File

@@ -43,6 +43,11 @@ type PackagingSpec struct {
effectiveLicenseFiles *Paths effectiveLicenseFiles *Paths
partition string 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 // Get file name of installed package
@@ -74,6 +79,10 @@ func (p *PackagingSpec) Partition() string {
return p.partition return p.partition
} }
func (p *PackagingSpec) SkipInstall() bool {
return p.skipInstall
}
type PackageModule interface { type PackageModule interface {
Module Module
packagingBase() *PackagingBase packagingBase() *PackagingBase