mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
Update vendor of containers/buildah v1.28.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
17
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
17
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/containers/storage/pkg/chrootarchive"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
// LookupImage returns *Image to corresponding imagename or id
|
||||
@@ -34,6 +35,22 @@ func LookupImage(ctx *types.SystemContext, store storage.Store, image string) (*
|
||||
return localImage, nil
|
||||
}
|
||||
|
||||
// NormalizePlatform validates and translate the platform to the canonical value.
|
||||
//
|
||||
// For example, if "Aarch64" is encountered, we change it to "arm64" or if
|
||||
// "x86_64" is encountered, it becomes "amd64".
|
||||
//
|
||||
// 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)
|
||||
return v1.Platform{
|
||||
OS: os,
|
||||
Architecture: arch,
|
||||
Variant: variant,
|
||||
}
|
||||
}
|
||||
|
||||
// GetTempDir returns base for a temporary directory on host.
|
||||
func GetTempDir() string {
|
||||
if tmpdir, ok := os.LookupEnv("TMPDIR"); ok {
|
||||
|
||||
Reference in New Issue
Block a user