packaging: install/package deps if not marked IsHideFromMake
TransitivePackagingSpecs() gathers transitive "install/package"
dependencies.
Previously, IsInstallDepNeeded(depTag) was checked. But, in this way,
some stub libraries which are marked as "HideFromMake()" to avoid
install/package can be gathered.
For example, libdexfile is not installed even if it is one of
libdexfile_support's runtime_libs because it is a stub library and the
impl is provided by "art" apex.
So when gathering transitive deps "IsHideFromMake()" is checked and if
the dep is hidden (so, not supposed to be installed) then the dep
(and its deps) is ignored.
Bug: 187686926
Test: m nothing
Test: m microdroid (libdexfile shouldn't be included in system/lib)
Test: m hosttar (no changes)
Change-Id: I2729001d4c64985cf0f2b37440c2082fe912e6c5
diff --git a/android/module.go b/android/module.go
index 99606d1..f355a8b 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1500,7 +1500,7 @@
var installDeps []*installPathsDepSet
var packagingSpecs []*packagingSpecsDepSet
ctx.VisitDirectDeps(func(dep Module) {
- if IsInstallDepNeeded(ctx.OtherModuleDependencyTag(dep)) {
+ if IsInstallDepNeeded(ctx.OtherModuleDependencyTag(dep)) && !dep.IsHideFromMake() {
installDeps = append(installDeps, dep.base().installFilesDepSet)
packagingSpecs = append(packagingSpecs, dep.base().packagingSpecsDepSet)
}