summaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/buildah/imagebuildah/build.go
diff options
context:
space:
mode:
authorMatt Heon <mheon@redhat.com>2024-02-01 15:17:45 -0500
committerMatt Heon <mheon@redhat.com>2024-02-02 08:11:17 -0500
commit2818abf8496554c0d357ae20bac89b64e54db4dd (patch)
treeae7d2ad2c8f6e89c208e93f8f7f0498a6763cff9 /vendor/github.com/containers/buildah/imagebuildah/build.go
parent5e64d4f021de18f21831139fe5b14e382bd86517 (diff)
Update to runc main, removing pin to an older version
We were pinned to a specific commit to ensure that tests kept passing. Hopefully they pass now, as we need to grab latest runc for CVE fixes. Also grab Buildah main to fix a build issue on FreeBSD. After a botched manual vendor, I used Ed's treadmill script and squashed it into this commit to make Git happy. Thanks bunches Ed. Signed-off-by: Matt Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/github.com/containers/buildah/imagebuildah/build.go')
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/build.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/containers/buildah/imagebuildah/build.go b/vendor/github.com/containers/buildah/imagebuildah/build.go
index 03081fde9..112bd2b62 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/build.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/build.go
@@ -651,7 +651,7 @@ func baseImages(dockerfilenames []string, dockerfilecontents [][]byte, from stri
return nil, fmt.Errorf("reading multiple stages: %w", err)
}
var baseImages []string
- nicknames := make(map[string]bool)
+ nicknames := make(map[string]struct{})
for stageIndex, stage := range stages {
node := stage.Node // first line
for node != nil { // each line
@@ -673,7 +673,7 @@ func baseImages(dockerfilenames []string, dockerfilecontents [][]byte, from stri
}
}
base := child.Next.Value
- if base != "" && base != buildah.BaseImageFakeName && !nicknames[base] {
+ if base != "" && base != buildah.BaseImageFakeName && !internalUtil.SetHas(nicknames, base) {
headingArgs := argsMapToSlice(stage.Builder.HeadingArgs)
userArgs := argsMapToSlice(stage.Builder.Args)
// append heading args so if --build-arg key=value is not
@@ -692,7 +692,7 @@ func baseImages(dockerfilenames []string, dockerfilecontents [][]byte, from stri
node = node.Next // next line
}
if stage.Name != strconv.Itoa(stageIndex) {
- nicknames[stage.Name] = true
+ nicknames[stage.Name] = struct{}{}
}
}
return baseImages, nil