vendor: github.com/moby/buildkit 25bec7145b39 (v0.14.0-dev)

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-03-28 17:43:43 +01:00
parent 8abef59087
commit de5efcb03b
31 changed files with 402 additions and 232 deletions

View File

@ -438,15 +438,23 @@ func (e *ExecOp) Output() Output {
}
func (e *ExecOp) Inputs() (inputs []Output) {
mm := map[Output]struct{}{}
// make sure mounts are sorted
// the same sort occurs in (*ExecOp).Marshal, and this
// sort must be the same
sort.Slice(e.mounts, func(i int, j int) bool {
return e.mounts[i].target < e.mounts[j].target
})
seen := map[Output]struct{}{}
for _, m := range e.mounts {
if m.source != nil {
mm[m.source] = struct{}{}
if _, ok := seen[m.source]; !ok {
inputs = append(inputs, m.source)
seen[m.source] = struct{}{}
}
}
}
for o := range mm {
inputs = append(inputs, o)
}
return
}