Skip to content

Commit

Permalink
update c/image
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed May 13, 2019
1 parent 54da4bc commit a38fd7f
Show file tree
Hide file tree
Showing 16 changed files with 838 additions and 300 deletions.
9 changes: 8 additions & 1 deletion cmd/skopeo/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,19 @@ func (opts *layersOptions) run(args []string, stdout io.Writer) (retErr error) {
}
}()

layerIndex := 0
for _, bd := range blobDigests {
r, blobSize, err := rawSource.GetBlob(ctx, types.BlobInfo{Digest: bd.digest, Size: -1}, cache)
if err != nil {
return err
}
if _, err := dest.PutBlob(ctx, r, types.BlobInfo{Digest: bd.digest, Size: blobSize}, cache, bd.isConfig); err != nil {
index := layerIndex
if bd.isConfig {
index = -1
} else {
layerIndex += 1
}
if _, err := dest.PutBlob(ctx, r, types.BlobInfo{Digest: bd.digest, Size: blobSize}, index, cache, bd.isConfig, nil); err != nil {
if closeErr := r.Close(); closeErr != nil {
return errors.Wrapf(err, " (close error: %v)", closeErr)
}
Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
github.com/urfave/cli v1.20.0
github.com/kr/pretty v0.1.0
github.com/kr/text v0.1.0
github.com/containers/image ff926d3c79684793a2135666a2cb738f44ba33dc
github.com/containers/image commit https://github.com/vrothberg/image
github.com/containers/buildah 810efa340ab43753034e2ed08ec290e4abab7e72
github.com/vbauerster/mpb v3.4.0
github.com/mattn/go-isatty v0.0.4
Expand Down
206 changes: 117 additions & 89 deletions vendor/github.com/containers/image/copy/copy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a38fd7f

Please sign in to comment.