summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-07-06 10:13:23 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-06 17:03:19 +0000
commit6092955783180b332b1a1b3c857e509ee1ccb284 (patch)
tree7a17156e3e55ab46f5814ea062ee7dee2886a522
parent8aed3857d3186e9345402b796b217a3c9edea3c9 (diff)
downloadpodman-6092955783180b332b1a1b3c857e509ee1ccb284.tar.gz
podman-6092955783180b332b1a1b3c857e509ee1ccb284.tar.bz2
podman-6092955783180b332b1a1b3c857e509ee1ccb284.zip
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 <bbaude@redhat.com> Closes: #1054 Approved by: mheon
-rw-r--r--cmd/podman/commit.go3
-rw-r--r--libpod/image/image.go3
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/commit.go b/cmd/podman/commit.go
index 6da24fa92..8d3c124bf 100644
--- a/cmd/podman/commit.go
+++ b/cmd/podman/commit.go
@@ -6,6 +6,7 @@ import (
"os"
"strings"
+ "github.com/containers/image/manifest"
"github.com/pkg/errors"
"github.com/projectatomic/buildah"
"github.com/projectatomic/libpod/cmd/podman/libpodruntime"
@@ -83,7 +84,7 @@ func commitCmd(c *cli.Context) error {
return errors.Errorf("messages are only compatible with the docker image format (-f docker)")
}
case "docker":
- mimeType = buildah.Dockerv2ImageManifest
+ mimeType = manifest.DockerV2Schema2MediaType
default:
return errors.Errorf("unrecognized image format %q", c.String("format"))
}
diff --git a/libpod/image/image.go b/libpod/image/image.go
index b56617ae7..5dd2c57f3 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -22,7 +22,6 @@ import (
"github.com/opencontainers/go-digest"
ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
- "github.com/projectatomic/buildah"
"github.com/projectatomic/libpod/libpod/common"
"github.com/projectatomic/libpod/libpod/driver"
"github.com/projectatomic/libpod/pkg/inspect"
@@ -940,7 +939,7 @@ func (i *Image) Containers() ([]string, error) {
// Comment returns the Comment for an image depending on its ManifestType
func (i *Image) Comment(ctx context.Context, manifestType string) (string, error) {
- if manifestType == buildah.Dockerv2ImageManifest {
+ if manifestType == manifest.DockerV2Schema2MediaType {
imgRef, err := i.toImageRef(ctx)
if err != nil {
return "", errors.Wrapf(err, "unable to create image reference from image")