mirror of
https://github.com/containers/podman.git
synced 2025-12-11 09:18:34 +08:00
Vendor in latest c/common
Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
16
vendor/github.com/containers/storage/pkg/chunked/compressor/compressor.go
generated
vendored
16
vendor/github.com/containers/storage/pkg/chunked/compressor/compressor.go
generated
vendored
@@ -420,6 +420,14 @@ func writeZstdChunkedStream(destFile io.Writer, outMetadata map[string]string, r
|
||||
zstdWriter.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
// make sure the entire tarball is flushed to the output as it might contain
|
||||
// some trailing zeros that affect the checksum.
|
||||
if _, err := io.Copy(zstdWriter, its); err != nil {
|
||||
zstdWriter.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
if err := zstdWriter.Flush(); err != nil {
|
||||
zstdWriter.Close()
|
||||
return err
|
||||
@@ -452,12 +460,12 @@ type zstdChunkedWriter struct {
|
||||
}
|
||||
|
||||
func (w zstdChunkedWriter) Close() error {
|
||||
err := <-w.tarSplitErr
|
||||
if err != nil {
|
||||
w.tarSplitOut.Close()
|
||||
errClose := w.tarSplitOut.Close()
|
||||
|
||||
if err := <-w.tarSplitErr; err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
return w.tarSplitOut.Close()
|
||||
return errClose
|
||||
}
|
||||
|
||||
func (w zstdChunkedWriter) Write(p []byte) (int, error) {
|
||||
|
||||
2
vendor/github.com/containers/storage/pkg/chunked/dump/dump.go
generated
vendored
2
vendor/github.com/containers/storage/pkg/chunked/dump/dump.go
generated
vendored
@@ -94,7 +94,7 @@ func getStMode(mode uint32, typ string) (uint32, error) {
|
||||
}
|
||||
|
||||
func dumpNode(out io.Writer, links map[string]int, verityDigests map[string]string, entry *internal.FileMetadata) error {
|
||||
path := entry.Name
|
||||
path := strings.TrimRight(entry.Name, "/")
|
||||
if path == "" {
|
||||
path = "/"
|
||||
} else if path[0] != '/' {
|
||||
|
||||
11
vendor/github.com/containers/storage/pkg/chunked/storage_linux.go
generated
vendored
11
vendor/github.com/containers/storage/pkg/chunked/storage_linux.go
generated
vendored
@@ -259,10 +259,17 @@ func GetDiffer(ctx context.Context, store storage.Store, blobSize int64, annotat
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if _, ok := annotations[internal.ManifestChecksumKey]; ok {
|
||||
_, hasZstdChunkedTOC := annotations[internal.ManifestChecksumKey]
|
||||
_, hasEstargzTOC := annotations[estargz.TOCJSONDigestAnnotation]
|
||||
|
||||
if hasZstdChunkedTOC && hasEstargzTOC {
|
||||
return nil, errors.New("both zstd:chunked and eStargz TOC found")
|
||||
}
|
||||
|
||||
if hasZstdChunkedTOC {
|
||||
return makeZstdChunkedDiffer(ctx, store, blobSize, annotations, iss, &storeOpts)
|
||||
}
|
||||
if _, ok := annotations[estargz.TOCJSONDigestAnnotation]; ok {
|
||||
if hasEstargzTOC {
|
||||
return makeEstargzChunkedDiffer(ctx, store, blobSize, annotations, iss, &storeOpts)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user