mirror of
https://github.com/containers/skopeo.git
synced 2025-09-02 23:26:29 +00:00
Update c/image for golang.org/x/exp
> go get github.com/containers/image/v5@main > go mod tidy && go mod vendor This updates c/image with a new version of x/exp. That package has changed API in an incompatible way, so just bumping x/exp (as in https://github.com/containers/skopeo/pull/2060 ) would break Skopeo builds. This updates both c/image and x/exp in lockstep (and nothing needs updating in Skopeo itself for the x/exp breakage). Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
7
vendor/github.com/vbatts/tar-split/archive/tar/reader.go
generated
vendored
7
vendor/github.com/vbatts/tar-split/archive/tar/reader.go
generated
vendored
@@ -7,7 +7,6 @@ package tar
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -140,7 +139,7 @@ func (tr *Reader) next() (*Header, error) {
|
||||
continue // This is a meta header affecting the next header
|
||||
case TypeGNULongName, TypeGNULongLink:
|
||||
format.mayOnlyBe(FormatGNU)
|
||||
realname, err := ioutil.ReadAll(tr)
|
||||
realname, err := io.ReadAll(tr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -334,7 +333,7 @@ func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) {
|
||||
// parsePAX parses PAX headers.
|
||||
// If an extended header (type 'x') is invalid, ErrHeader is returned
|
||||
func parsePAX(r io.Reader) (map[string]string, error) {
|
||||
buf, err := ioutil.ReadAll(r)
|
||||
buf, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -916,7 +915,7 @@ func discard(tr *Reader, n int64) error {
|
||||
}
|
||||
}
|
||||
|
||||
copySkipped, err = io.CopyN(ioutil.Discard, r, n-seekSkipped)
|
||||
copySkipped, err = io.CopyN(io.Discard, r, n-seekSkipped)
|
||||
out:
|
||||
if err == io.EOF && seekSkipped+copySkipped < n {
|
||||
err = io.ErrUnexpectedEOF
|
||||
|
16
vendor/github.com/vbatts/tar-split/tar/asm/disassemble.go
generated
vendored
16
vendor/github.com/vbatts/tar-split/tar/asm/disassemble.go
generated
vendored
@@ -135,13 +135,15 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
|
||||
}
|
||||
isEOF = true
|
||||
}
|
||||
_, err = p.AddEntry(storage.Entry{
|
||||
Type: storage.SegmentType,
|
||||
Payload: paddingChunk[:n],
|
||||
})
|
||||
if err != nil {
|
||||
pW.CloseWithError(err)
|
||||
return
|
||||
if n != 0 {
|
||||
_, err = p.AddEntry(storage.Entry{
|
||||
Type: storage.SegmentType,
|
||||
Payload: paddingChunk[:n],
|
||||
})
|
||||
if err != nil {
|
||||
pW.CloseWithError(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
if isEOF {
|
||||
break
|
||||
|
17
vendor/github.com/vbatts/tar-split/tar/storage/packer.go
generated
vendored
17
vendor/github.com/vbatts/tar-split/tar/storage/packer.go
generated
vendored
@@ -24,13 +24,6 @@ type Unpacker interface {
|
||||
Next() (*Entry, error)
|
||||
}
|
||||
|
||||
/* TODO(vbatts) figure out a good model for this
|
||||
type PackUnpacker interface {
|
||||
Packer
|
||||
Unpacker
|
||||
}
|
||||
*/
|
||||
|
||||
type jsonUnpacker struct {
|
||||
seen seenNames
|
||||
dec *json.Decoder
|
||||
@@ -115,13 +108,3 @@ func NewJSONPacker(w io.Writer) Packer {
|
||||
seen: seenNames{},
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
TODO(vbatts) perhaps have a more compact packer/unpacker, maybe using msgapck
|
||||
(https://github.com/ugorji/go)
|
||||
|
||||
|
||||
Even though, since our jsonUnpacker and jsonPacker just take
|
||||
io.Reader/io.Writer, then we can get away with passing them a
|
||||
gzip.Reader/gzip.Writer
|
||||
*/
|
||||
|
Reference in New Issue
Block a user