summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-07-02 14:37:30 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-07-16 14:19:56 +0200
commite1ac0c303342f47dd06f861e312c2e4d10136df3 (patch)
tree1574e90b3461fae7b511bbea3ee5b38ee11a4054 /pkg/api/handlers
parentf0cd16cb32676eaf5ee337b50e8628f2f49ccce9 (diff)
downloadpodman-e1ac0c303342f47dd06f861e312c2e4d10136df3.tar.gz
podman-e1ac0c303342f47dd06f861e312c2e4d10136df3.tar.bz2
podman-e1ac0c303342f47dd06f861e312c2e4d10136df3.zip
vendor containers/common@main
The `IgnorePlatform` options has been removed from the `LookupImageOptions` in libimage to properly support multi-arch images. Skip one buildah-bud test which requires updated CI images. This is currently being done in github.com/containers/podman/pull/10829 but we need to unblock merging common and buildah into podman. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/images_history.go4
-rw-r--r--pkg/api/handlers/compat/images_tag.go4
-rw-r--r--pkg/api/handlers/libpod/images.go4
-rw-r--r--pkg/api/handlers/utils/images.go3
4 files changed, 4 insertions, 11 deletions
diff --git a/pkg/api/handlers/compat/images_history.go b/pkg/api/handlers/compat/images_history.go
index ea596890f..54c893f47 100644
--- a/pkg/api/handlers/compat/images_history.go
+++ b/pkg/api/handlers/compat/images_history.go
@@ -3,7 +3,6 @@ package compat
import (
"net/http"
- "github.com/containers/common/libimage"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/pkg/api/handlers"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
@@ -14,8 +13,7 @@ func HistoryImage(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
name := utils.GetName(r)
- lookupOptions := &libimage.LookupImageOptions{IgnorePlatform: true}
- newImage, _, err := runtime.LibimageRuntime().LookupImage(name, lookupOptions)
+ newImage, _, err := runtime.LibimageRuntime().LookupImage(name, nil)
if err != nil {
utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Wrapf(err, "failed to find image %s", name))
return
diff --git a/pkg/api/handlers/compat/images_tag.go b/pkg/api/handlers/compat/images_tag.go
index 8d256f4fa..199ad0488 100644
--- a/pkg/api/handlers/compat/images_tag.go
+++ b/pkg/api/handlers/compat/images_tag.go
@@ -4,7 +4,6 @@ import (
"fmt"
"net/http"
- "github.com/containers/common/libimage"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/pkg/errors"
@@ -16,8 +15,7 @@ func TagImage(w http.ResponseWriter, r *http.Request) {
// /v1.xx/images/(name)/tag
name := utils.GetName(r)
- lookupOptions := &libimage.LookupImageOptions{IgnorePlatform: true}
- newImage, _, err := runtime.LibimageRuntime().LookupImage(name, lookupOptions)
+ newImage, _, err := runtime.LibimageRuntime().LookupImage(name, nil)
if err != nil {
utils.ImageNotFound(w, name, errors.Wrapf(err, "failed to find image %s", name))
return
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index fc6ab4b4c..d759f4824 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -11,7 +11,6 @@ import (
"strings"
"github.com/containers/buildah"
- "github.com/containers/common/libimage"
"github.com/containers/common/pkg/filters"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
@@ -215,8 +214,7 @@ func ExportImage(w http.ResponseWriter, r *http.Request) {
}
name := utils.GetName(r)
- lookupOptions := &libimage.LookupImageOptions{IgnorePlatform: true}
- if _, _, err := runtime.LibimageRuntime().LookupImage(name, lookupOptions); err != nil {
+ if _, _, err := runtime.LibimageRuntime().LookupImage(name, nil); err != nil {
utils.ImageNotFound(w, name, err)
return
}
diff --git a/pkg/api/handlers/utils/images.go b/pkg/api/handlers/utils/images.go
index 2a1908d63..1e8edb6dd 100644
--- a/pkg/api/handlers/utils/images.go
+++ b/pkg/api/handlers/utils/images.go
@@ -88,8 +88,7 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*libimage.Image, error
func GetImage(r *http.Request, name string) (*libimage.Image, error) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
- lookupOptions := &libimage.LookupImageOptions{IgnorePlatform: true}
- image, _, err := runtime.LibimageRuntime().LookupImage(name, lookupOptions)
+ image, _, err := runtime.LibimageRuntime().LookupImage(name, nil)
if err != nil {
return nil, err
}