vendor: Bump github.com/containers/buildah from 1.22.3 to 1.23.0

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
This commit is contained in:
Aditya Rajan
2021-09-15 13:30:44 +05:30
parent 323fe36313
commit 222b62e7b0
25 changed files with 269 additions and 106 deletions

View File

@@ -393,9 +393,18 @@ func (i *containerImageRef) NewImageSource(ctx context.Context, sc *types.System
rc.Close()
return nil, errors.Wrapf(err, "error opening file for %s", what)
}
destHasher := digest.Canonical.Digester()
counter := ioutils.NewWriteCounter(layerFile)
multiWriter := io.MultiWriter(counter, destHasher.Hash())
var destHasher digest.Digester
var multiWriter io.Writer
// Avoid rehashing when we do not compress.
if i.compression != archive.Uncompressed {
destHasher = digest.Canonical.Digester()
multiWriter = io.MultiWriter(counter, destHasher.Hash())
} else {
destHasher = srcHasher
multiWriter = counter
}
// Compress the layer, if we're recompressing it.
writeCloser, err := archive.CompressStream(multiWriter, i.compression)
if err != nil {