Fix bootstrap package build stage default
Packages were defaulting to StageBootstrap, while they need to be in
StagePrimary and they'll be moved into StageBootstrap if necessary.
diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go
index 7ed2a44..040489c 100644
--- a/bootstrap/bootstrap.go
+++ b/bootstrap/bootstrap.go
@@ -116,11 +116,11 @@
return
}
- mctx.VisitDirectDeps(func (mod blueprint.Module) {
- if m, ok := mod.(bootstrapGoCore); ok {
- m.SetBuildStage(StageBootstrap)
- }
- })
+ mctx.VisitDirectDeps(func(mod blueprint.Module) {
+ if m, ok := mod.(bootstrapGoCore); ok {
+ m.SetBuildStage(StageBootstrap)
+ }
+ })
}
type goPackageProducer interface {
@@ -184,7 +184,8 @@
func newGoPackageModuleFactory(config *Config) func() (blueprint.Module, []interface{}) {
return func() (blueprint.Module, []interface{}) {
module := &goPackage{
- config: config,
+ buildStage: StagePrimary,
+ config: config,
}
return module, []interface{}{&module.properties}
}