From 64091777fe78fac407f472cf4eb2d3e66719f23a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 11 Jun 2024 07:44:05 -0400 Subject: [PATCH] Remove references to --pull=true and --pull=false Signed-off-by: Daniel J Walsh --- cmd/podman/common/build.go | 2 +- docs/source/markdown/options/pull.image.md | 6 +++--- docs/source/markdown/podman-build.1.md.in | 2 -- test/system/070-build.bats | 5 +++++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/podman/common/build.go b/cmd/podman/common/build.go index 2abf62520e..2174b3bf8a 100644 --- a/cmd/podman/common/build.go +++ b/cmd/podman/common/build.go @@ -75,7 +75,7 @@ func DefineBuildFlags(cmd *cobra.Command, buildOpts *BuildFlagsWrapper, isFarmBu if err := flag.Value.Set("missing"); err != nil { logrus.Errorf("Unable to set --pull to 'missing': %v", err) } - flag.Usage = `Pull image policy ("always/true"|"missing"|"never/false"|"newer")` + flag.Usage = `Pull image policy ("always"|"missing"|"never"|"newer")` flags.AddFlagSet(&budFlags) // Add the completion functions diff --git a/docs/source/markdown/options/pull.image.md b/docs/source/markdown/options/pull.image.md index 0b0a6ccfda..112e612210 100644 --- a/docs/source/markdown/options/pull.image.md +++ b/docs/source/markdown/options/pull.image.md @@ -4,9 +4,9 @@ ####> are applicable to all of those. #### **--pull**=*policy* -Pull image policy. The default is **always**. +Pull image policy. The default is **missing**. -- **always**, **true**: Always pull the image and throw an error if the pull fails. +- **always**: Always pull the image and throw an error if the pull fails. - **missing**: Only pull the image when it does not exist in the local containers storage. Throw an error if no image is found and the pull fails. -- **never**, **false**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found. +- **never**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found. - **newer**: Pull if the image on the registry is newer than the one in the local containers storage. An image is considered to be newer when the digests are different. Comparing the time stamps is prone to errors. Pull errors are suppressed if a local image was found. diff --git a/docs/source/markdown/podman-build.1.md.in b/docs/source/markdown/podman-build.1.md.in index 8887e2193d..898e9b66e9 100644 --- a/docs/source/markdown/podman-build.1.md.in +++ b/docs/source/markdown/podman-build.1.md.in @@ -313,8 +313,6 @@ the help of emulation provided by packages like `qemu-user-static`. @@option pull.image -Pull image policy. The default is **missing**. - @@option quiet @@option retry diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 2daf7edfac..7048c2a05a 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -1168,4 +1168,9 @@ function teardown() { basic_teardown } +@test "podman build --help defaults" { + run_podman build --help + assert "$output" =~ "--pull.*(default \"missing\")" "pull should default to missing" +} + # vim: filetype=sh