Loading apex/apex.go +40 −3 Original line number Diff line number Diff line Loading @@ -404,7 +404,7 @@ type apexBundle struct { /////////////////////////////////////////////////////////////////////////////////////////// // Inputs // Keys for apex_paylaod.img // Keys for apex_payload.img publicKeyFile android.Path privateKeyFile android.Path Loading Loading @@ -2606,9 +2606,46 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool { return a.depVisitor(&vctx, ctx, child, parent) }) vctx.normalizeFileInfo(ctx) if a.privateKeyFile == nil { if ctx.Config().AllowMissingDependencies() { // TODO(b/266099037): a better approach for slim manifests. ctx.AddMissingDependencies([]string{String(a.overridableProperties.Key)}) // Create placeholder paths for later stages that expect to see those paths, // though they won't be used. var unusedPath = android.PathForModuleOut(ctx, "nonexistentprivatekey") ctx.Build(pctx, android.BuildParams{ Rule: android.ErrorRule, Output: unusedPath, Args: map[string]string{ "error": "Private key not available", }, }) a.privateKeyFile = unusedPath } else { ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.overridableProperties.Key)) return } } if a.publicKeyFile == nil { if ctx.Config().AllowMissingDependencies() { // TODO(b/266099037): a better approach for slim manifests. ctx.AddMissingDependencies([]string{String(a.overridableProperties.Key)}) // Create placeholder paths for later stages that expect to see those paths, // though they won't be used. var unusedPath = android.PathForModuleOut(ctx, "nonexistentpublickey") ctx.Build(pctx, android.BuildParams{ Rule: android.ErrorRule, Output: unusedPath, Args: map[string]string{ "error": "Public key not available", }, }) a.publicKeyFile = unusedPath } else { ctx.PropertyErrorf("key", "public_key for %q could not be found", String(a.overridableProperties.Key)) return } } //////////////////////////////////////////////////////////////////////////////////////////// // 3) some fields in apexBundle struct are configured Loading Loading
apex/apex.go +40 −3 Original line number Diff line number Diff line Loading @@ -404,7 +404,7 @@ type apexBundle struct { /////////////////////////////////////////////////////////////////////////////////////////// // Inputs // Keys for apex_paylaod.img // Keys for apex_payload.img publicKeyFile android.Path privateKeyFile android.Path Loading Loading @@ -2606,9 +2606,46 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool { return a.depVisitor(&vctx, ctx, child, parent) }) vctx.normalizeFileInfo(ctx) if a.privateKeyFile == nil { if ctx.Config().AllowMissingDependencies() { // TODO(b/266099037): a better approach for slim manifests. ctx.AddMissingDependencies([]string{String(a.overridableProperties.Key)}) // Create placeholder paths for later stages that expect to see those paths, // though they won't be used. var unusedPath = android.PathForModuleOut(ctx, "nonexistentprivatekey") ctx.Build(pctx, android.BuildParams{ Rule: android.ErrorRule, Output: unusedPath, Args: map[string]string{ "error": "Private key not available", }, }) a.privateKeyFile = unusedPath } else { ctx.PropertyErrorf("key", "private_key for %q could not be found", String(a.overridableProperties.Key)) return } } if a.publicKeyFile == nil { if ctx.Config().AllowMissingDependencies() { // TODO(b/266099037): a better approach for slim manifests. ctx.AddMissingDependencies([]string{String(a.overridableProperties.Key)}) // Create placeholder paths for later stages that expect to see those paths, // though they won't be used. var unusedPath = android.PathForModuleOut(ctx, "nonexistentpublickey") ctx.Build(pctx, android.BuildParams{ Rule: android.ErrorRule, Output: unusedPath, Args: map[string]string{ "error": "Public key not available", }, }) a.publicKeyFile = unusedPath } else { ctx.PropertyErrorf("key", "public_key for %q could not be found", String(a.overridableProperties.Key)) return } } //////////////////////////////////////////////////////////////////////////////////////////// // 3) some fields in apexBundle struct are configured Loading