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
diff --git a/android/module_context.go b/android/module_context.go
index d3e2770..dea22ba 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -476,6 +476,7 @@
executable: executable,
effectiveLicenseFiles: &licenseFiles,
partition: fullInstallPath.partition,
+ skipInstall: m.skipInstall(),
}
m.packagingSpecs = append(m.packagingSpecs, spec)
return spec
@@ -599,6 +600,7 @@
symlinkTarget: relPath,
executable: false,
partition: fullInstallPath.partition,
+ skipInstall: m.skipInstall(),
})
return fullInstallPath
@@ -640,6 +642,7 @@
symlinkTarget: absPath,
executable: false,
partition: fullInstallPath.partition,
+ skipInstall: m.skipInstall(),
})
return fullInstallPath