"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/github.com/containers/common/libimage/import.go" between
podman-3.2.2.tar.gz and podman-3.2.3.tar.gz

About: podman (previous name "libpod") provides a library for applications looking to use the Container Pod concept, popularized by Kubernetes. Podman manages pods, containers, container images, and container volumes.

import.go  (podman-3.2.2):import.go  (podman-3.2.3)
skipping to change at line 83 skipping to change at line 83
updater, ok := srcRef.(tarballTransport.ConfigUpdater) updater, ok := srcRef.(tarballTransport.ConfigUpdater)
if !ok { if !ok {
return "", errors.New("unexpected type, a tarball reference shoul d implement tarball.ConfigUpdater") return "", errors.New("unexpected type, a tarball reference shoul d implement tarball.ConfigUpdater")
} }
annotations := make(map[string]string) annotations := make(map[string]string)
if err := updater.ConfigUpdate(config, annotations); err != nil { if err := updater.ConfigUpdate(config, annotations); err != nil {
return "", err return "", err
} }
name := options.Tag id, err := getImageDigest(ctx, srcRef, r.systemContextCopy())
if name == "" { if err != nil {
name, err = getImageDigest(ctx, srcRef, r.systemContextCopy()) return "", err
if err != nil {
return "", err
}
name = "sha256:" + name[1:] // strip leading "@"
} }
destRef, err := storageTransport.Transport.ParseStoreReference(r.store, n ame) destRef, err := storageTransport.Transport.ParseStoreReference(r.store, i d)
if err != nil { if err != nil {
return "", err return "", err
} }
c, err := r.newCopier(&options.CopyOptions) c, err := r.newCopier(&options.CopyOptions)
if err != nil { if err != nil {
return "", err return "", err
} }
defer c.close() defer c.close()
if _, err := c.copy(ctx, srcRef, destRef); err != nil { if _, err := c.copy(ctx, srcRef, destRef); err != nil {
return "", err return "", err
} }
return name, nil // Strip the leading @ off the id.
name := id[1:]
// If requested, tag the imported image.
if options.Tag != "" {
image, _, err := r.LookupImage(name, nil)
if err != nil {
return "", errors.Wrap(err, "looking up imported image")
}
if err := image.Tag(options.Tag); err != nil {
return "", err
}
}
return "sha256:" + name, nil
} }
 End of changes. 3 change blocks. 
9 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)