mirror of
https://github.com/containers/skopeo.git
synced 2025-10-22 11:44:05 +00:00
Re-vendor, and use mtrmac/image-spec:id-based-loader to fix tests
Anyone running (vndr) currently ends up with failing tests in OCI schema validation because gojsonschema has fixed its "$ref" interpretation, exposing inconsistent URI usage inside image-spec/schema. So, this runs (vndr), and uses mtrmac/image-spec:id-based-loader ( https://github.com/opencontainers/image-spec/pull/739 ) to make the tests pass again. As soon as that PR is merged we should revert to using the upstream image-spec repo again.
This commit is contained in:
16
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
16
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -699,9 +699,9 @@ func (d *Driver) isParent(id, parent string) bool {
|
||||
}
|
||||
|
||||
// ApplyDiff applies the new layer into a root
|
||||
func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64, err error) {
|
||||
func (d *Driver) ApplyDiff(id, parent, mountLabel string, diff io.Reader) (size int64, err error) {
|
||||
if !d.isParent(id, parent) {
|
||||
return d.naiveDiff.ApplyDiff(id, parent, diff)
|
||||
return d.naiveDiff.ApplyDiff(id, parent, mountLabel, diff)
|
||||
}
|
||||
|
||||
applyDir := d.getDiffPath(id)
|
||||
@@ -728,18 +728,18 @@ func (d *Driver) getDiffPath(id string) string {
|
||||
// DiffSize calculates the changes between the specified id
|
||||
// and its parent and returns the size in bytes of the changes
|
||||
// relative to its base filesystem directory.
|
||||
func (d *Driver) DiffSize(id, parent string) (size int64, err error) {
|
||||
func (d *Driver) DiffSize(id, parent, mountLabel string) (size int64, err error) {
|
||||
if useNaiveDiff(d.home) || !d.isParent(id, parent) {
|
||||
return d.naiveDiff.DiffSize(id, parent)
|
||||
return d.naiveDiff.DiffSize(id, parent, mountLabel)
|
||||
}
|
||||
return directory.Size(d.getDiffPath(id))
|
||||
}
|
||||
|
||||
// Diff produces an archive of the changes between the specified
|
||||
// layer and its parent layer which may be "".
|
||||
func (d *Driver) Diff(id, parent string) (io.ReadCloser, error) {
|
||||
func (d *Driver) Diff(id, parent, mountLabel string) (io.ReadCloser, error) {
|
||||
if useNaiveDiff(d.home) || !d.isParent(id, parent) {
|
||||
return d.naiveDiff.Diff(id, parent)
|
||||
return d.naiveDiff.Diff(id, parent, mountLabel)
|
||||
}
|
||||
|
||||
diffPath := d.getDiffPath(id)
|
||||
@@ -754,9 +754,9 @@ func (d *Driver) Diff(id, parent string) (io.ReadCloser, error) {
|
||||
|
||||
// Changes produces a list of changes between the specified layer
|
||||
// and its parent layer. If parent is "", then all changes will be ADD changes.
|
||||
func (d *Driver) Changes(id, parent string) ([]archive.Change, error) {
|
||||
func (d *Driver) Changes(id, parent, mountLabel string) ([]archive.Change, error) {
|
||||
if useNaiveDiff(d.home) || !d.isParent(id, parent) {
|
||||
return d.naiveDiff.Changes(id, parent)
|
||||
return d.naiveDiff.Changes(id, parent, mountLabel)
|
||||
}
|
||||
// Overlay doesn't have snapshots, so we need to get changes from all parent
|
||||
// layers.
|
||||
|
Reference in New Issue
Block a user