| 1 |
From: Reinhard Tartler <[email protected]> |
| 2 |
Date: Sun, 26 Oct 2025 06:42:29 -0400 |
| 3 |
Subject: Fix FTBFS with newer k8s/klog |
| 4 |
|
| 5 |
Forwarded: no |
| 6 |
--- |
| 7 |
cmd/imagebuilder/imagebuilder.go | 2 +- |
| 8 |
dockerclient/client.go | 4 ++-- |
| 9 |
2 files changed, 3 insertions(+), 3 deletions(-) |
| 10 |
|
| 11 |
diff --git a/cmd/imagebuilder/imagebuilder.go b/cmd/imagebuilder/imagebuilder.go |
| 12 |
index 0e7b274..8810522 100644 |
| 13 |
--- a/cmd/imagebuilder/imagebuilder.go |
| 14 |
+++ b/cmd/imagebuilder/imagebuilder.go |
| 15 |
@@ -152,7 +152,7 @@ func main() { |
| 16 |
return nil, false |
| 17 |
} |
| 18 |
options.LogFn = func(format string, args ...interface{}) { |
| 19 |
- if klog.V(2) { |
| 20 |
+ if klog.V(2).Enabled() { |
| 21 |
log.Printf("Builder: "+format, args...) |
| 22 |
} else { |
| 23 |
fmt.Fprintf(options.Out, "--> %s\n", fmt.Sprintf(format, args...)) |
| 24 |
diff --git a/dockerclient/client.go b/dockerclient/client.go |
| 25 |
index f404705..44ed7ab 100644 |
| 26 |
--- a/dockerclient/client.go |
| 27 |
+++ b/dockerclient/client.go |
| 28 |
@@ -654,7 +654,7 @@ func (e *ClientExecutor) LoadImageWithPlatform(from string, platform string) (*d |
| 29 |
Platform: platform, |
| 30 |
RawJSONStream: true, |
| 31 |
} |
| 32 |
- if klog.V(5) { |
| 33 |
+ if klog.V(5).Enabled() { |
| 34 |
pullImageOptions.OutputStream = os.Stderr |
| 35 |
pullImageOptions.RawJSONStream = false |
| 36 |
} |
| 37 |
@@ -1167,7 +1167,7 @@ func (e *ClientExecutor) CopyContainer(container *docker.Container, excludes []s |
| 38 |
r = filtered |
| 39 |
} |
| 40 |
klog.V(5).Infof("Uploading to %s%s at %s", container.ID, asOwner, c.Dest) |
| 41 |
- if klog.V(6) { |
| 42 |
+ if klog.V(6).Enabled() { |
| 43 |
logArchiveOutput(r, "Archive file for %s") |
| 44 |
} |
| 45 |
// add a workaround allow us to notice if a |