Skip to content

Commit

Permalink
Merge pull request containers#2116 from mtrmac/tar-split
Browse files Browse the repository at this point in the history
Use tar-split/tar/asm.IterateHeaders now that it has been accepted
  • Loading branch information
openshift-merge-bot[bot] authored Sep 27, 2024
2 parents 17ceb4d + 39e467a commit c90a35b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 173 deletions.
6 changes: 5 additions & 1 deletion pkg/chunked/compression_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package chunked

import (
archivetar "archive/tar"
"bytes"
"errors"
"fmt"
"io"
Expand All @@ -14,6 +15,8 @@ import (
"github.com/klauspost/pgzip"
digest "github.com/opencontainers/go-digest"
"github.com/vbatts/tar-split/archive/tar"
"github.com/vbatts/tar-split/tar/asm"
"github.com/vbatts/tar-split/tar/storage"
expMaps "golang.org/x/exp/maps"
)

Expand Down Expand Up @@ -256,7 +259,8 @@ func ensureTOCMatchesTarSplit(toc *internal.TOC, tarSplit []byte) error {
}
}

if err := iterateTarSplit(tarSplit, func(hdr *tar.Header) error {
unpacker := storage.NewJSONUnpacker(bytes.NewReader(tarSplit))
if err := asm.IterateHeaders(unpacker, func(hdr *tar.Header) error {
e, ok := pendingFiles[hdr.Name]
if !ok {
return fmt.Errorf("tar-split contains an entry for %q missing in TOC", hdr.Name)
Expand Down
68 changes: 0 additions & 68 deletions pkg/chunked/tar_split_linux.go

This file was deleted.

104 changes: 0 additions & 104 deletions pkg/chunked/tar_split_linux_test.go

This file was deleted.

0 comments on commit c90a35b

Please sign in to comment.