mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
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
This commit is contained in:
committed by
Atomic Bot
parent
81df604bdb
commit
70189f0223
7
vendor/github.com/containers/image/copy/copy.go
generated
vendored
7
vendor/github.com/containers/image/copy/copy.go
generated
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user