mirror of
https://github.com/containers/podman.git
synced 2025-09-25 15:55:32 +08:00
Update containers/storage to pick up overlay driver fix
New pinned commit is ff8a6d2bf496daf46ab1a153f783a0f6b8762a54 This includes a fix to error reporting with overlayfs, and will produce more verbose errors when initializing overlayfs fails. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #546 Approved by: baude
This commit is contained in:
23
vendor/github.com/containers/storage/images.go
generated
vendored
23
vendor/github.com/containers/storage/images.go
generated
vendored
@ -124,10 +124,25 @@ type imageStore struct {
|
||||
bydigest map[digest.Digest][]*Image
|
||||
}
|
||||
|
||||
func copyImage(i *Image) *Image {
|
||||
return &Image{
|
||||
ID: i.ID,
|
||||
Digest: i.Digest,
|
||||
Names: copyStringSlice(i.Names),
|
||||
TopLayer: i.TopLayer,
|
||||
Metadata: i.Metadata,
|
||||
BigDataNames: copyStringSlice(i.BigDataNames),
|
||||
BigDataSizes: copyStringInt64Map(i.BigDataSizes),
|
||||
BigDataDigests: copyStringDigestMap(i.BigDataDigests),
|
||||
Created: i.Created,
|
||||
Flags: copyStringInterfaceMap(i.Flags),
|
||||
}
|
||||
}
|
||||
|
||||
func (r *imageStore) Images() ([]Image, error) {
|
||||
images := make([]Image, len(r.images))
|
||||
for i := range r.images {
|
||||
images[i] = *(r.images[i])
|
||||
images[i] = *copyImage(r.images[i])
|
||||
}
|
||||
return images, nil
|
||||
}
|
||||
@ -343,7 +358,7 @@ func (r *imageStore) Create(id string, names []string, layer, metadata string, c
|
||||
}
|
||||
err = r.Save()
|
||||
}
|
||||
return image, err
|
||||
return copyImage(image), err
|
||||
}
|
||||
|
||||
func (r *imageStore) Metadata(id string) (string, error) {
|
||||
@ -450,7 +465,7 @@ func (r *imageStore) Delete(id string) error {
|
||||
|
||||
func (r *imageStore) Get(id string) (*Image, error) {
|
||||
if image, ok := r.lookup(id); ok {
|
||||
return image, nil
|
||||
return copyImage(image), nil
|
||||
}
|
||||
return nil, ErrImageUnknown
|
||||
}
|
||||
@ -546,7 +561,7 @@ func (r *imageStore) BigDataNames(id string) ([]string, error) {
|
||||
if !ok {
|
||||
return nil, ErrImageUnknown
|
||||
}
|
||||
return image.BigDataNames, nil
|
||||
return copyStringSlice(image.BigDataNames), nil
|
||||
}
|
||||
|
||||
func imageSliceWithoutValue(slice []*Image, value *Image) []*Image {
|
||||
|
Reference in New Issue
Block a user