Skip to content

Commit 6092955

Browse files
bauderh-atomic-bot
authored andcommitted
remove buildah requirement for the libpod image library
if we snip the requirement to use a buildah const in the libpod image library, we can save something on the order of 85 vendored files in consumers of the the library. Signed-off-by: baude <[email protected]> Closes: #1054 Approved by: mheon
1 parent 8aed385 commit 6092955

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/podman/commit.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"os"
77
"strings"
88

9+
"github.com/containers/image/manifest"
910
"github.com/pkg/errors"
1011
"github.com/projectatomic/buildah"
1112
"github.com/projectatomic/libpod/cmd/podman/libpodruntime"
@@ -83,7 +84,7 @@ func commitCmd(c *cli.Context) error {
8384
return errors.Errorf("messages are only compatible with the docker image format (-f docker)")
8485
}
8586
case "docker":
86-
mimeType = buildah.Dockerv2ImageManifest
87+
mimeType = manifest.DockerV2Schema2MediaType
8788
default:
8889
return errors.Errorf("unrecognized image format %q", c.String("format"))
8990
}

libpod/image/image.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/opencontainers/go-digest"
2323
ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
2424
"github.com/pkg/errors"
25-
"github.com/projectatomic/buildah"
2625
"github.com/projectatomic/libpod/libpod/common"
2726
"github.com/projectatomic/libpod/libpod/driver"
2827
"github.com/projectatomic/libpod/pkg/inspect"
@@ -940,7 +939,7 @@ func (i *Image) Containers() ([]string, error) {
940939

941940
// Comment returns the Comment for an image depending on its ManifestType
942941
func (i *Image) Comment(ctx context.Context, manifestType string) (string, error) {
943-
if manifestType == buildah.Dockerv2ImageManifest {
942+
if manifestType == manifest.DockerV2Schema2MediaType {
944943
imgRef, err := i.toImageRef(ctx)
945944
if err != nil {
946945
return "", errors.Wrapf(err, "unable to create image reference from image")

0 commit comments

Comments
 (0)