mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
Update vendor containers/(common,image,storage)
Fixes: https://github.com/containers/podman/issues/16150 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
30
vendor/github.com/containers/storage/images.go
generated
vendored
30
vendor/github.com/containers/storage/images.go
generated
vendored
@@ -129,21 +129,10 @@ type rwImageStore interface {
|
||||
// read-only) layer. That layer can be referenced by multiple images.
|
||||
Create(id string, names []string, layer, metadata string, created time.Time, searchableDigest digest.Digest) (*Image, error)
|
||||
|
||||
// SetNames replaces the list of names associated with an image with the
|
||||
// supplied values. The values are expected to be valid normalized
|
||||
// updateNames modifies names associated with an image based on (op, names).
|
||||
// The values are expected to be valid normalized
|
||||
// named image references.
|
||||
// Deprecated: Prone to race conditions, suggested alternatives are `AddNames` and `RemoveNames`.
|
||||
SetNames(id string, names []string) error
|
||||
|
||||
// AddNames adds the supplied values to the list of names associated with the image with
|
||||
// the specified id. The values are expected to be valid normalized
|
||||
// named image references.
|
||||
AddNames(id string, names []string) error
|
||||
|
||||
// RemoveNames removes the supplied values from the list of names associated with the image with
|
||||
// the specified id. The values are expected to be valid normalized
|
||||
// named image references.
|
||||
RemoveNames(id string, names []string) error
|
||||
updateNames(id string, names []string, op updateNameOperation) error
|
||||
|
||||
// Delete removes the record of the image.
|
||||
Delete(id string) error
|
||||
@@ -516,19 +505,6 @@ func (i *Image) addNameToHistory(name string) {
|
||||
i.NamesHistory = dedupeNames(append([]string{name}, i.NamesHistory...))
|
||||
}
|
||||
|
||||
// Deprecated: Prone to race conditions, suggested alternatives are `AddNames` and `RemoveNames`.
|
||||
func (r *imageStore) SetNames(id string, names []string) error {
|
||||
return r.updateNames(id, names, setNames)
|
||||
}
|
||||
|
||||
func (r *imageStore) AddNames(id string, names []string) error {
|
||||
return r.updateNames(id, names, addNames)
|
||||
}
|
||||
|
||||
func (r *imageStore) RemoveNames(id string, names []string) error {
|
||||
return r.updateNames(id, names, removeNames)
|
||||
}
|
||||
|
||||
func (r *imageStore) updateNames(id string, names []string, op updateNameOperation) error {
|
||||
if !r.IsReadWrite() {
|
||||
return fmt.Errorf("not allowed to change image name assignments at %q: %w", r.imagespath(), ErrStoreIsReadOnly)
|
||||
|
||||
Reference in New Issue
Block a user