mirror of
https://github.com/containers/podman.git
synced 2025-11-14 01:57:58 +08:00
Vendor in new opencontainers/selinux
Also update vendor of containers/common,buildah,storage,image Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069586 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/buildah/new.go
generated
vendored
10
vendor/github.com/containers/buildah/new.go
generated
vendored
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/containers/image/v5/transports"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/openshift/imagebuilder"
|
||||
@@ -48,6 +49,15 @@ func getImageName(name string, img *storage.Image) string {
|
||||
|
||||
func imageNamePrefix(imageName string) string {
|
||||
prefix := imageName
|
||||
if d, err := digest.Parse(imageName); err == nil {
|
||||
prefix = d.Encoded()
|
||||
if len(prefix) > 12 {
|
||||
prefix = prefix[:12]
|
||||
}
|
||||
}
|
||||
if stringid.ValidateID(prefix) == nil {
|
||||
prefix = stringid.TruncateID(prefix)
|
||||
}
|
||||
s := strings.Split(prefix, ":")
|
||||
if len(s) > 0 {
|
||||
prefix = s[0]
|
||||
|
||||
Reference in New Issue
Block a user