Makefile: vendor target should always remove toolchain

We never want the toolchain as the default is to use the same as the go
version. So the only purpose of toolchain is to force a newer compiler
than necessary which we do not want as we are getting build by many
different distributions and block builds that would otherwise work fine
is just not helpful to anyone.

Also update the go.mod comments remind people that there should be no
toolchain. The make vendor target with the toolchain will now guarantee
this so the CI will fail otherwise.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-10-29 13:21:17 +01:00
parent ef20e75a77
commit 0acd192b59
4 changed files with 7 additions and 1 deletions

View File

@ -348,6 +348,7 @@ vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify
$(GO) mod edit -toolchain none
# We define *-in-container targets for the following make targets. This allow the targets to be run in a container.

3
go.mod
View File

@ -1,6 +1,7 @@
module github.com/containers/podman/v5
// Warning: Ensure the "go" and "toolchain" versions match exactly to prevent unwanted auto-updates
// Warning: if there is a "toolchain" directive anywhere in this file (and most of the
// time there shouldn't be), its version must be an exact match to the "go" directive.
go 1.22.6

View File

@ -12,6 +12,7 @@ vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify
$(GO) mod edit -toolchain none
.PHONY: clean
clean:

View File

@ -1,5 +1,8 @@
module github.com/containers/podman/test/tools
// Warning: if there is a "toolchain" directive anywhere in this file (and most of the
// time there shouldn't be), its version must be an exact match to the "go" directive.
go 1.22.0
require (