Vendor common and buildah main

Update the common and buildah vendor to pull in the
platform code move.

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
Urvashi Mohnani
2023-10-16 13:35:29 -04:00
parent dabf6c83a7
commit 1b0be2f348
10 changed files with 132 additions and 99 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/containers/buildah/define"
"github.com/containers/common/libimage"
lplatform "github.com/containers/common/libimage/platform"
"github.com/containers/image/v5/types"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
@@ -41,7 +42,7 @@ func LookupImage(ctx *types.SystemContext, store storage.Store, image string) (*
// Wrapper around libimage.NormalizePlatform to return and consume
// v1.Platform instead of independent os, arch and variant.
func NormalizePlatform(platform v1.Platform) v1.Platform {
os, arch, variant := libimage.NormalizePlatform(platform.OS, platform.Architecture, platform.Variant)
os, arch, variant := lplatform.Normalize(platform.OS, platform.Architecture, platform.Variant)
return v1.Platform{
OS: os,
Architecture: arch,