diff --git a/go/compose/frombus/frombus.go b/go/compose/frombus/frombus.go index bf8f4ed..0c1c28f 100644 --- a/go/compose/frombus/frombus.go +++ b/go/compose/frombus/frombus.go @@ -35,6 +35,7 @@ import ( "encoding/json" "fmt" "net/netip" + "slices" "sort" "strings" @@ -398,7 +399,9 @@ func fromBuilds(ctx context.Context, r Reader, in *compose.Input, s Scope, p del } for _, pm := range p.Modules { m, ok := modules[pm.Module] - if !ok || m.FP2 == "" || s.KeptAt[pm.Module] != "" { + if !ok || m.FP2 == "" || s.KeptAt[pm.Module] != "" || slices.Contains(s.InOwn, pm.Module) { + // A module it runs inside its own composition is composed there as before: no build of the new form is what + // it runs (Scope.InOwn). continue } if man, ok := in.Catalogue[pm.Module]; !ok || (man.Build == nil && !man.Templated()) {