diff options
author | TomSweeneyRedHat <tsweeney@redhat.com> | 2020-10-20 17:39:06 -0400 |
---|---|---|
committer | TomSweeneyRedHat <tsweeney@redhat.com> | 2020-10-21 19:24:56 -0400 |
commit | 852f2cbe858a8880c356869c622b49ee362c5307 (patch) | |
tree | cb37f2a673d08acc9258daf9bc278d6f734d9ca2 /cmd/podman/generate | |
parent | 2bd920b00540280696d19dc95ab6e562aebd6b7d (diff) | |
download | podman-852f2cbe858a8880c356869c622b49ee362c5307.tar.gz podman-852f2cbe858a8880c356869c622b49ee362c5307.tar.bz2 podman-852f2cbe858a8880c356869c622b49ee362c5307.zip |
Fix pull method selection
When using 'podman build --pull=true', the image was not pulled
if the image being pulled was present locally, but a newer version
was in the repository. It was only pulled if there was no image
in local storage.
In addition, the pull-never option was ignored. The line
`if flags.Pull{` at line 244 was always returning true
negating the default pullPolicy of PullNever.
Reworked the algorthim for the selection process. Now
PullIfNewer is set to the default, and then we set the
pullPolicy appropriately based on the other flags
passed in to this routine.
As an FYI, logic run in the calling functions ensures
that we have only one pull flag in the command.
Addresses: #8024
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'cmd/podman/generate')
0 files changed, 0 insertions, 0 deletions