Skip to content

docs: fix pull --policy value from newer to ifnewer - #6994

Closed
locker95 wants to merge 4 commits into
podman-container-tools:mainfrom
locker95:fix-6992-pull-policy-ifnewer
Closed

docs: fix pull --policy value from newer to ifnewer#6994
locker95 wants to merge 4 commits into
podman-container-tools:mainfrom
locker95:fix-6992-pull-policy-ifnewer

Conversation

@locker95

Copy link
Copy Markdown

Summary

The buildah pull man page documented --policy=newer, but the CLI only accepts ifnewer via define.PolicyMap (see cmd/buildah/pull.go and define/pull.go). Using --policy newer fails with:

Error: unsupported pull policy "newer"

Update docs/buildah-pull.1.md so the documented values match the CLI: always, missing, never, and ifnewer.

Note: buildah from / buildah build --pull docs that mention newer are intentionally left unchanged; those commands parse both newer and ifnewer via parse.PullPolicyFromOptions.

Fixes #6992

Test plan

  • Confirmed CLI help: --policy string missing, always, ifnewer, or never.
  • Confirmed define.PolicyMap keys are only missing, always, never, ifnewer
  • Man page now documents ifnewer consistently in the flag synopsis and bullet list

The buildah pull man page documented --policy=newer, but the CLI
accepts only ifnewer via define.PolicyMap. Align the docs with the
actual flag values (missing, always, ifnewer, or never).

Fixes podman-container-tools#6992

Signed-off-by: Dean Chen <862469039@qq.com>
@packit-as-a-service

Copy link
Copy Markdown

Ephemeral COPR build failed. @containers/packit-build please check.

@locker95

Copy link
Copy Markdown
Author

The Packit COPR failures look infrastructure-side rather than related to this docs-only change:

Backend process error: Giving up waiting for copr_base repository, please try to manually regenerate the DNF repository

SRPM built successfully; the chroot never got past waiting for repomd.xml (no builder-live.log / mock log was produced). Other recent buildah PRs (e.g. #6961) show rpm-build green.

Change is only docs/buildah-pull.1.md (newerifnewer to match define.PolicyMap).

/packit build

locker95 added 2 commits July 25, 2026 23:50
Signed-off-by: Dean Chen <862469039@qq.com>
Docs-only change; previous failures were COPR base repo timeouts.

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95

Copy link
Copy Markdown
Author

/packit build

@nalind

nalind commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

We do want to accept aliases for some of these, though. Pitching #7000 to do that.

@locker95

Copy link
Copy Markdown
Author

@nalind Makes sense — accepting aliases on the CLI side is the better fix. Glad #7000 covers that.

This PR only corrects the man page so it documents the canonical ifnewer value from define.PolicyMap (the previous newer string was wrong for the shipped binary). Fine to land independently of, or after, #7000 as you prefer.

@nalind

nalind commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

On that note, can we describe the two as being equivalent? IIRC the set of values we document here is meant to be in line with podman pull, possibly back in #2754.

@leonardomoreira00

leonardomoreira00 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Just a note: it's a little frustrating to spend time using and understanding the code, opening an issue, and working on a solution, only to later see someone use AI to duplicate the pull request.

Ofc, this is just a typo, but it is happening even to bigger PRs.

My friends who are more involved in open source complain about this all the time.
I feel sorry for the maintainers... what a time to be alive

Align the pull policy description with podman-pull(1): the policy
podman documents as "newer" is the same behavior as buildah's ifnewer.

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95

Copy link
Copy Markdown
Author

@nalind Good call — updated the man page to state that buildah's ifnewer is the same policy podman documents as newer (podman pull --policy=newer), so the documented value sets stay aligned.

Agree on accepting aliases in the CLI map; happy to leave that to #7000 rather than expanding PolicyMap in this docs-only PR.

@nalind

nalind commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Hold up, why did this start as an exact duplicate of #6993?

@locker95

Copy link
Copy Markdown
Author

@nalind yeah, bad timing on my side. #6993 already had the ifnewer fix when i opened this — i should've checked and pointed at that instead of stacking another PR on the same typo.

closing this in favor of #6993. sorry for the noise @leonardomoreira00.

@locker95 locker95 closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: buildah pull --policy expects ifnewer instead of newer

3 participants