aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-09-14 03:33:25 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-15 08:55:21 +0000
commit70189f0223cc01a2949cea436e06f3aee316d0db (patch)
tree67e5a7e977ec2829032e729f45c7c8e8644f9e01 /vendor
parent81df604bdb20367572f2f69872da802cb5846e35 (diff)
downloadpodman-70189f0223cc01a2949cea436e06f3aee316d0db.tar.gz
podman-70189f0223cc01a2949cea436e06f3aee316d0db.tar.bz2
podman-70189f0223cc01a2949cea436e06f3aee316d0db.zip
Vndr latest containers/image
Containers image has a fix docker tarfile: use the cached digest if existing Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1482 Approved by: rhatdan
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/image/copy/copy.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/containers/image/copy/copy.go b/vendor/github.com/containers/image/copy/copy.go
index 183993c5d..59354ea38 100644
--- a/vendor/github.com/containers/image/copy/copy.go
+++ b/vendor/github.com/containers/image/copy/copy.go
@@ -533,20 +533,21 @@ func (ic *imageCopier) copyLayer(ctx context.Context, srcInfo types.BlobInfo) (t
if err != nil {
return types.BlobInfo{}, "", err
}
- var diffIDResult diffIDResult // = {digest:""}
if diffIDIsNeeded {
select {
case <-ctx.Done():
return types.BlobInfo{}, "", ctx.Err()
- case diffIDResult = <-diffIDChan:
+ case diffIDResult := <-diffIDChan:
if diffIDResult.err != nil {
return types.BlobInfo{}, "", errors.Wrap(diffIDResult.err, "Error computing layer DiffID")
}
logrus.Debugf("Computed DiffID %s for layer %s", diffIDResult.digest, srcInfo.Digest)
ic.c.cachedDiffIDs[srcInfo.Digest] = diffIDResult.digest
+ return blobInfo, diffIDResult.digest, nil
}
+ } else {
+ return blobInfo, ic.c.cachedDiffIDs[srcInfo.Digest], nil
}
- return blobInfo, diffIDResult.digest, nil
}
// copyLayerFromStream is an implementation detail of copyLayer; mostly providing a separate “defer” scope.