mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
vendor containers/common@e27c30ee9b
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/common/libimage/layer_tree.go
generated
vendored
10
vendor/github.com/containers/common/libimage/layer_tree.go
generated
vendored
@ -75,15 +75,17 @@ func (l *layerNode) repoTags() ([]string, error) {
|
||||
|
||||
// layerTree extracts a layerTree from the layers in the local storage and
|
||||
// relates them to the specified images.
|
||||
func (r *Runtime) layerTree() (*layerTree, error) {
|
||||
func (r *Runtime) layerTree(images []*Image) (*layerTree, error) {
|
||||
layers, err := r.store.Layers()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
images, err := r.ListImages(context.Background(), nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if images == nil {
|
||||
images, err = r.ListImages(context.Background(), nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
tree := layerTree{
|
||||
|
||||
Reference in New Issue
Block a user