Commit Graph

12 Commits

Author SHA1 Message Date
Giuseppe Scrivano 5a999561b8 chunked: rename GetDiffer to NewDiffer
it is an explicit API breaking change, so that cannot be used by old
users (e.g. an older containers/image version) that are not ported to
support the new semantic that only one ApplyDiffWithDiffer call is
supported for one differ object.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-05-07 08:52:19 +02:00
Giuseppe Scrivano 6203c6f58f cmd: use PrepareStagedLayer
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-09-19 09:33:27 +02:00
Jan Rodák 2bfc88c641 Fix errcheck: error return value of `m.CleanupStagedLayer` is not checked
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-07-09 16:57:57 +02:00
Giuseppe Scrivano 68dc3c700d cmd: replace usage of deprecated functions
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-10 15:21:00 +02:00
Giuseppe Scrivano 33391f1020 chunked: validate converted images
validate that the retrieved data for converted images matches the
expected digest.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-01-08 22:00:35 +01:00
Giuseppe Scrivano cf52867921 store: new struct to pass ApplyDiffWithDiffer opts
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-12-04 16:58:13 +01:00
Giuseppe Scrivano e2b9a7719d cmd: add applydiff-using-staging-dir
add a new command to exercise the ApplyDiff from a staging directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-03 09:38:44 +02:00
Miloslav Trmač 67e2c873d4 Add more error handling to cmd/containers-storage
Introduce an outputJSON helper to decrease repetition.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-14 17:17:54 +02:00
Miloslav Trmač 7c002b2a2a Consolidate error reporting in cmd/containers-storage
Have the action handlers return an error value, and let
main() format that error, if any; this avoids duplicated
error formating code in the action handlers, dropping
89 lines.

This might change the error format in some cases (typically
%v vs. %+v).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-14 17:17:53 +02:00
Nalin Dahyabhai 6275d3a46a CLI helper: print backtraces with errors
Print backtrace information when displaying an error returned by our
API, to make troubleshooting tests a bit easier.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-02-26 14:19:15 -05:00
Nalin Dahyabhai 32710454cb Make Diff() methods take an optional *DiffOptions
Add an optional *DiffOptions parameter to Diff() methods (which can be
nil), to allow overriding of default behaviors.

At this time, that's just what type of compression is applied, if we
want something other than what was recorded when the diff was applied,
but we can add more later if needed.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-06-16 10:50:08 -04:00
Nalin Dahyabhai d96905a24e Rename CLI from oci-storage to containers-storage
Rename the CLI tool to match the name that we gave the transport that
uses it in containers/image, which affects just about every consumer of
this library.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-05-25 15:50:33 -04:00