Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default .Repository and .Tag values to <none> #7240

Merged
merged 1 commit into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions cmd/podman/images/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func sortImages(imageS []*entities.ImageSummary) ([]imageReporter, error) {
} else {
h.ImageSummary = *e
h.Repository = "<none>"
h.Tag = "<none>"
imgs = append(imgs, h)
}
listFlag.readOnly = e.IsReadOnly()
Expand All @@ -205,27 +206,34 @@ func sortImages(imageS []*entities.ImageSummary) ([]imageReporter, error) {
}

func tokenRepoTag(ref string) (string, string, error) {

if ref == "<none>:<none>" {
return "<none>", "<none>", nil
}

repo, err := reference.Parse(ref)
if err != nil {
return "", "", err
return "<none>", "<none>", err
}

named, ok := repo.(reference.Named)
if !ok {
return ref, "", nil
return ref, "<none>", nil
}
name := named.Name()
if name == "" {
name = "<none>"
}

tagged, ok := repo.(reference.Tagged)
if !ok {
return named.Name(), "", nil
return name, "<none>", nil
}
tag := tagged.Tag()
if tag == "" {
tag = "<none>"
}

return named.Name(), tagged.Tag(), nil
return name, tag, nil

}

Expand Down
2 changes: 0 additions & 2 deletions test/system/120-load.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ verify_iid_and_name() {


@test "podman load - by image ID" {
skip_if_remote "FIXME: pending #7123"

# FIXME: how to build a simple archive instead?
get_iid_and_name

Expand Down