mirror of
https://github.com/containers/skopeo.git
synced 2026-02-03 07:48:30 +00:00
Update implementation to match dependencies
types.ImageSource.Close() can return an error now, and ParseImageName() moved to containers/image/transports/alltransports. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/containers/image/transports"
|
||||
"github.com/containers/image/transports/alltransports"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/projectatomic/buildah"
|
||||
"github.com/urfave/cli"
|
||||
@@ -90,7 +90,7 @@ func commitCmd(c *cli.Context) error {
|
||||
return fmt.Errorf("error reading build container %q: %v", name, err)
|
||||
}
|
||||
|
||||
dest, err := transports.ParseImageName(output)
|
||||
dest, err := alltransports.ParseImageName(output)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing target image name %q: %v", output, err)
|
||||
}
|
||||
|
||||
3
image.go
3
image.go
@@ -255,11 +255,12 @@ func (i *containerImageRef) Transport() types.ImageTransport {
|
||||
return is.Transport
|
||||
}
|
||||
|
||||
func (i *containerImageSource) Close() {
|
||||
func (i *containerImageSource) Close() error {
|
||||
err := os.RemoveAll(i.path)
|
||||
if err != nil {
|
||||
logrus.Errorf("error removing %q: %v", i.path, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (i *containerImageSource) Reference() types.ImageReference {
|
||||
|
||||
6
pull.go
6
pull.go
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/containers/image/docker/reference"
|
||||
"github.com/containers/image/signature"
|
||||
is "github.com/containers/image/storage"
|
||||
"github.com/containers/image/transports"
|
||||
"github.com/containers/image/transports/alltransports"
|
||||
"github.com/containers/image/types"
|
||||
"github.com/containers/storage/storage"
|
||||
)
|
||||
@@ -21,9 +21,9 @@ func pullImage(store storage.Store, options BuilderOptions, sc *types.SystemCont
|
||||
spec = options.Registry + spec
|
||||
}
|
||||
|
||||
srcRef, err := transports.ParseImageName(name)
|
||||
srcRef, err := alltransports.ParseImageName(name)
|
||||
if err != nil {
|
||||
srcRef2, err2 := transports.ParseImageName(spec)
|
||||
srcRef2, err2 := alltransports.ParseImageName(spec)
|
||||
if err2 != nil {
|
||||
return fmt.Errorf("error parsing image name %q: %v", spec, err2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user