Leave a module the node runs inside its own composition to its manifest, as the fold composes it, so taking builds in moves no folded module (issue 1126)

This commit is contained in:
2026-10-27 21:11:20 +01:00
parent 04de3e5da2
commit d7a758894a
+4 -1
View File
@@ -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()) {