diff --git a/deprecated.go b/deprecated.go index 5fadc27df..beb82b6bf 100644 --- a/deprecated.go +++ b/deprecated.go @@ -207,7 +207,6 @@ type LayerStore interface { Mounted(id string) (int, error) ParentOwners(id string) (uids, gids []int, err error) ApplyDiff(to string, diff io.Reader) (int64, error) - ApplyDiffWithDiffer(to string, options *drivers.ApplyDiffOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error) DifferTarget(id string) (string, error) LoadLocked() error PutAdditionalLayer(id string, parentLayer *Layer, names []string, aLayer drivers.AdditionalLayer) (layer *Layer, err error) diff --git a/pkg/chunked/storage_linux.go b/pkg/chunked/storage_linux.go index bbacff998..75f3634da 100644 --- a/pkg/chunked/storage_linux.go +++ b/pkg/chunked/storage_linux.go @@ -199,7 +199,7 @@ func (c *chunkedDiffer) Close() error { return nil } -// GetDiffer returns a differ than can be used with ApplyDiffWithDiffer. +// GetDiffer returns a differ than can be used with [Store.PrepareStagedLayer]. // If it returns an error that matches ErrFallbackToOrdinaryLayerDownload, the caller can // retry the operation with a different method. func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (graphdriver.Differ, error) { diff --git a/pkg/chunked/storage_unsupported.go b/pkg/chunked/storage_unsupported.go index fe3d36c76..daed1359e 100644 --- a/pkg/chunked/storage_unsupported.go +++ b/pkg/chunked/storage_unsupported.go @@ -11,7 +11,7 @@ import ( digest "github.com/opencontainers/go-digest" ) -// GetDiffer returns a differ than can be used with ApplyDiffWithDiffer. +// GetDiffer returns a differ than can be used with [Store.PrepareStagedLayer]. func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (graphdriver.Differ, error) { return nil, newErrFallbackToOrdinaryLayerDownload(errors.New("format not supported on this system")) } diff --git a/store.go b/store.go index 869b0c516..e525ff590 100644 --- a/store.go +++ b/store.go @@ -362,12 +362,6 @@ type Store interface { // } ApplyDiff(to string, diff io.Reader) (int64, error) - // ApplyDiffWithDiffer applies a diff to a layer. - // It is the caller responsibility to clean the staging directory if it is not - // successfully applied with ApplyStagedLayer. - // Deprecated: Use PrepareStagedLayer instead. ApplyDiffWithDiffer is going to be removed in a future release - ApplyDiffWithDiffer(to string, options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error) - // PrepareStagedLayer applies a diff to a layer. // It is the caller responsibility to clean the staging directory if it is not // successfully applied with ApplyStagedLayer. @@ -3177,13 +3171,6 @@ func (s *store) PrepareStagedLayer(options *drivers.ApplyDiffWithDifferOpts, dif return rlstore.applyDiffWithDifferNoLock(options, differ) } -func (s *store) ApplyDiffWithDiffer(to string, options *drivers.ApplyDiffWithDifferOpts, differ drivers.Differ) (*drivers.DriverWithDifferOutput, error) { - if to != "" { - return nil, fmt.Errorf("ApplyDiffWithDiffer does not support non-empty 'layer' parameter") - } - return s.PrepareStagedLayer(options, differ) -} - func (s *store) DifferTarget(id string) (string, error) { return writeToLayerStore(s, func(rlstore rwLayerStore) (string, error) { if rlstore.Exists(id) {