Call SkipInstall before InstallFile
InstallFile skips install only if SkipInstall is called before InstallFile. Bug: 190442286 Test: build/soong/scripts/build-ndk-prebuilts.sh Change-Id: Ic497e34816ea5ac23be45e34c242b59bf1a01e28
This commit is contained in:
parent
af2697a452
commit
31db274078
3 changed files with 16 additions and 16 deletions
|
@ -175,13 +175,13 @@ func (c *policyConf) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||
}
|
||||
|
||||
func (c *policyConf) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
c.installSource = c.transformPolicyToConf(ctx)
|
||||
c.installPath = android.PathForModuleInstall(ctx, "etc")
|
||||
ctx.InstallFile(c.installPath, c.stem(), c.installSource)
|
||||
|
||||
if !c.installable() {
|
||||
c.SkipInstall()
|
||||
}
|
||||
|
||||
c.installSource = c.transformPolicyToConf(ctx)
|
||||
c.installPath = android.PathForModuleInstall(ctx, "etc")
|
||||
ctx.InstallFile(c.installPath, c.stem(), c.installSource)
|
||||
}
|
||||
|
||||
func (c *policyConf) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
@ -325,6 +325,10 @@ func (c *policyCil) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
conf := android.PathForModuleSrc(ctx, *c.properties.Src)
|
||||
cil := c.compileConfToCil(ctx, conf)
|
||||
|
||||
if !c.Installable() {
|
||||
c.SkipInstall()
|
||||
}
|
||||
|
||||
if c.InstallInDebugRamdisk() {
|
||||
// for userdebug_plat_sepolicy.cil
|
||||
c.installPath = android.PathForModuleInstall(ctx)
|
||||
|
@ -333,10 +337,6 @@ func (c *policyCil) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
}
|
||||
c.installSource = cil
|
||||
ctx.InstallFile(c.installPath, c.stem(), c.installSource)
|
||||
|
||||
if !c.Installable() {
|
||||
c.SkipInstall()
|
||||
}
|
||||
}
|
||||
|
||||
func (c *policyCil) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
|
|
@ -82,13 +82,13 @@ func (v *sepolicyVers) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
rule.Command().Text("echo").Text(ver).Text(">").Output(out)
|
||||
rule.Build("sepolicy_vers", v.Name())
|
||||
|
||||
v.installPath = android.PathForModuleInstall(ctx, "etc", "selinux")
|
||||
v.installSource = out
|
||||
ctx.InstallFile(v.installPath, v.stem(), v.installSource)
|
||||
|
||||
if !v.installable() {
|
||||
v.SkipInstall()
|
||||
}
|
||||
|
||||
v.installPath = android.PathForModuleInstall(ctx, "etc", "selinux")
|
||||
v.installSource = out
|
||||
ctx.InstallFile(v.installPath, v.stem(), v.installSource)
|
||||
}
|
||||
|
||||
func (v *sepolicyVers) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
|
|
@ -151,16 +151,16 @@ func (m *versionedPolicy) GenerateAndroidBuildActions(ctx android.ModuleContext)
|
|||
|
||||
rule.Build("mapping", "Versioning mapping file "+ctx.ModuleName())
|
||||
|
||||
if !m.installable() {
|
||||
m.SkipInstall()
|
||||
}
|
||||
|
||||
m.installSource = out
|
||||
m.installPath = android.PathForModuleInstall(ctx, "etc", "selinux")
|
||||
if subdir := proptools.String(m.properties.Relative_install_path); subdir != "" {
|
||||
m.installPath = m.installPath.Join(ctx, subdir)
|
||||
}
|
||||
ctx.InstallFile(m.installPath, m.installSource.Base(), m.installSource)
|
||||
|
||||
if !m.installable() {
|
||||
m.SkipInstall()
|
||||
}
|
||||
}
|
||||
|
||||
func (m *versionedPolicy) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
|
Loading…
Reference in a new issue