From 5023ce585c724b0c2bd49945393585d72b6e6342 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 2 Jun 2022 13:54:04 -0400 Subject: [PATCH 1/2] Align docker load and podman load output The comma-separated podman load output isn't conducive for using the subsequent images. For tarballs with multiple images, the comma separator must be manually identified and a suitable range identified. Docker CLI on the other hand, has one image identifier per line: Loaded image: repo1/name1:latest Loaded image: repo1/name1:tag1 Loaded image: repo2/name2:tag1 (as of Docker version 20.10.16, build aa7e414). Switch `podman load` to this format for consistency and usability. [NO NEW TESTS NEEDED] Signed-off-by: Alexander Scheel --- cmd/podman/images/load.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go index dbb7c32fae..c18c323879 100644 --- a/cmd/podman/images/load.go +++ b/cmd/podman/images/load.go @@ -110,6 +110,6 @@ func load(cmd *cobra.Command, args []string) error { if err != nil { return err } - fmt.Println("Loaded image(s): " + strings.Join(response.Names, ",")) + fmt.Println("Loaded image: " + strings.Join(response.Names, "\nLoaded image: ")) return nil } From 1b6505d74bd5e2594aacb13c1310700be6ef3a32 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 2 Jun 2022 16:05:05 -0400 Subject: [PATCH 2/2] Update test output expectation Signed-off-by: Alexander Scheel --- docs/source/markdown/podman-image-scp.1.md | 12 ++++++------ test/system/120-load.bats | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/markdown/podman-image-scp.1.md b/docs/source/markdown/podman-image-scp.1.md index 1d902da917..b6b610a7d4 100644 --- a/docs/source/markdown/podman-image-scp.1.md +++ b/docs/source/markdown/podman-image-scp.1.md @@ -33,7 +33,7 @@ Suppress the output ``` $ podman image scp alpine -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ``` @@ -43,12 +43,12 @@ Copying blob 72e830a4dff5 done Copying config 85f9dc67c7 done Writing manifest to image destination Storing signatures -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ``` $ podman image scp Fedora::alpine RHEL:: -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ``` @@ -59,7 +59,7 @@ Copying blob 9450ef9feb15 [--------------------------------------] 0.0b / 0.0b Copying config 1f97f0559c done Writing manifest to image destination Storing signatures -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ``` @@ -73,7 +73,7 @@ Copying blob 5eb901baf107 skipped: already exists Copying config 696d33ca15 done Writing manifest to image destination Storing signatures -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ``` @@ -87,7 +87,7 @@ Copying blob 5eb901baf107 Copying config 696d33ca15 done Writing manifest to image destination Storing signatures -Loaded image(s): docker.io/library/alpine:latest +Loaded image: docker.io/library/alpine:latest ``` ## SEE ALSO diff --git a/test/system/120-load.bats b/test/system/120-load.bats index 45e0b33627..5a7f63b439 100644 --- a/test/system/120-load.bats +++ b/test/system/120-load.bats @@ -121,7 +121,7 @@ verify_iid_and_name() { run_podman untag $IMAGE $newname run_podman image scp -q ${notme}@localhost::$newname - expect="Loaded image(s): $newname" + expect="Loaded image: $newname" is "$output" "$expect" "-q silences output" # Confirm that we have it, and that its digest matches our original