From: Reinhard Tartler <siretart@tauware.de>
Date: Sun, 26 Oct 2025 06:42:29 -0400
Subject: Fix FTBFS with newer k8s/klog

Forwarded: no
---
 cmd/imagebuilder/imagebuilder.go | 2 +-
 dockerclient/client.go           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/imagebuilder/imagebuilder.go b/cmd/imagebuilder/imagebuilder.go
index ee9934b..5a905f1 100644
--- a/cmd/imagebuilder/imagebuilder.go
+++ b/cmd/imagebuilder/imagebuilder.go
@@ -149,7 +149,7 @@ func main() {
 		return nil, false
 	}
 	options.LogFn = func(format string, args ...interface{}) {
-		if klog.V(2) {
+		if klog.V(2).Enabled() {
 			log.Printf("Builder: "+format, args...)
 		} else {
 			fmt.Fprintf(options.Out, "--> %s\n", fmt.Sprintf(format, args...))
diff --git a/dockerclient/client.go b/dockerclient/client.go
index 5cbc91a..3bcc61d 100644
--- a/dockerclient/client.go
+++ b/dockerclient/client.go
@@ -648,7 +648,7 @@ func (e *ClientExecutor) LoadImageWithPlatform(from string, platform string) (*d
 				Platform:      platform,
 				RawJSONStream: true,
 			}
-			if klog.V(5) {
+			if klog.V(5).Enabled() {
 				pullImageOptions.OutputStream = os.Stderr
 				pullImageOptions.RawJSONStream = false
 			}
@@ -1142,7 +1142,7 @@ func (e *ClientExecutor) CopyContainer(container *docker.Container, excludes []s
 				r = filtered
 			}
 			klog.V(5).Infof("Uploading to %s%s at %s", container.ID, asOwner, c.Dest)
-			if klog.V(6) {
+			if klog.V(6).Enabled() {
 				logArchiveOutput(r, "Archive file for %s")
 			}
 			// add a workaround allow us to notice if a
