mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
vendor c/common
Also update the e2e pull test to account for the changes when pulling from the dir transport. Images pulled via the dir transport are not tagged anymore; the path is not a reliable source. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
22
vendor/github.com/containers/common/libimage/load.go
generated
vendored
22
vendor/github.com/containers/common/libimage/load.go
generated
vendored
@ -35,17 +35,6 @@ func (r *Runtime) Load(ctx context.Context, path string, options *LoadOptions) (
|
||||
var loadErrors []error
|
||||
|
||||
for _, f := range []func() ([]string, string, error){
|
||||
// DOCKER-ARCHIVE - must be first (see containers/podman/issues/10809)
|
||||
func() ([]string, string, error) {
|
||||
logrus.Debugf("-> Attempting to load %q as a Docker archive", path)
|
||||
ref, err := dockerArchiveTransport.ParseReference(path)
|
||||
if err != nil {
|
||||
return nil, dockerArchiveTransport.Transport.Name(), err
|
||||
}
|
||||
images, err := r.loadMultiImageDockerArchive(ctx, ref, &options.CopyOptions)
|
||||
return images, dockerArchiveTransport.Transport.Name(), err
|
||||
},
|
||||
|
||||
// OCI
|
||||
func() ([]string, string, error) {
|
||||
logrus.Debugf("-> Attempting to load %q as an OCI directory", path)
|
||||
@ -68,6 +57,17 @@ func (r *Runtime) Load(ctx context.Context, path string, options *LoadOptions) (
|
||||
return images, ociArchiveTransport.Transport.Name(), err
|
||||
},
|
||||
|
||||
// DOCKER-ARCHIVE
|
||||
func() ([]string, string, error) {
|
||||
logrus.Debugf("-> Attempting to load %q as a Docker archive", path)
|
||||
ref, err := dockerArchiveTransport.ParseReference(path)
|
||||
if err != nil {
|
||||
return nil, dockerArchiveTransport.Transport.Name(), err
|
||||
}
|
||||
images, err := r.loadMultiImageDockerArchive(ctx, ref, &options.CopyOptions)
|
||||
return images, dockerArchiveTransport.Transport.Name(), err
|
||||
},
|
||||
|
||||
// DIR
|
||||
func() ([]string, string, error) {
|
||||
logrus.Debugf("-> Attempting to load %q as a Docker dir", path)
|
||||
|
||||
Reference in New Issue
Block a user