summaryrefslogtreecommitdiff
path: root/pkg/autoupdate/autoupdate.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-16 16:08:58 +0200
committerGitHub <noreply@github.com>2020-06-16 16:08:58 +0200
commit0968f25988624699f2db559f0a984cf84c8a284f (patch)
tree930b6592e196e3519924457774d0270aa727cee0 /pkg/autoupdate/autoupdate.go
parente0dd2279120f9883c0678cce644952007e3ae771 (diff)
parentaf3c4d88b405adb0353f8085298d25e3a5937ee3 (diff)
downloadpodman-0968f25988624699f2db559f0a984cf84c8a284f.tar.gz
podman-0968f25988624699f2db559f0a984cf84c8a284f.tar.bz2
podman-0968f25988624699f2db559f0a984cf84c8a284f.zip
Merge pull request #6615 from vrothberg/auto-update-variant
auto-update: use image's arch
Diffstat (limited to 'pkg/autoupdate/autoupdate.go')
-rw-r--r--pkg/autoupdate/autoupdate.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go
index eca5c342c..0ec98d3b6 100644
--- a/pkg/autoupdate/autoupdate.go
+++ b/pkg/autoupdate/autoupdate.go
@@ -251,8 +251,19 @@ func newerImageAvailable(runtime *libpod.Runtime, img *image.Image, origName str
return false, err
}
+ data, err := img.Inspect(context.Background())
+ if err != nil {
+ return false, err
+ }
+
sys := runtime.SystemContext()
sys.AuthFilePath = options.Authfile
+
+ // We need to account for the arch that the image uses. It seems
+ // common on ARM to tweak this option to pull the correct image. See
+ // github.com/containers/libpod/issues/6613.
+ sys.ArchitectureChoice = data.Architecture
+
remoteImg, err := remoteRef.NewImage(context.Background(), sys)
if err != nil {
return false, err