From 57e8c66322849ff60e6126616c0c9883a80fb139 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 15 Mar 2021 12:55:06 +0100 Subject: Do not leak libpod package into the remote client Some packages used by the remote client imported the libpod package. This is not wanted because it adds unnecessary bloat to the client and also causes problems with platform specific code(linux only), see #9710. The solution is to move the used functions/variables into extra packages which do not import libpod. This change shrinks the remote client size more than 6MB compared to the current master. [NO TESTS NEEDED] I have no idea how to test this properly but with #9710 the cross compile should fail. Signed-off-by: Paul Holzinger --- cmd/podman/volumes/prune.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/podman/volumes') diff --git a/cmd/podman/volumes/prune.go b/cmd/podman/volumes/prune.go index 8f78d0bae..8e190b870 100644 --- a/cmd/podman/volumes/prune.go +++ b/cmd/podman/volumes/prune.go @@ -9,11 +9,11 @@ import ( "github.com/containers/common/pkg/completion" "github.com/containers/podman/v3/cmd/podman/common" + "github.com/containers/podman/v3/cmd/podman/parse" "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/cmd/podman/utils" "github.com/containers/podman/v3/cmd/podman/validate" "github.com/containers/podman/v3/pkg/domain/entities" - "github.com/containers/podman/v3/pkg/domain/filters" "github.com/spf13/cobra" ) @@ -58,14 +58,14 @@ func prune(cmd *cobra.Command, args []string) error { if err != nil { return err } - pruneOptions.Filters, err = filters.ParseFilterArgumentsIntoFilters(filter) + pruneOptions.Filters, err = parse.FilterArgumentsIntoFilters(filter) if !force { reader := bufio.NewReader(os.Stdin) fmt.Println("WARNING! This will remove all volumes not used by at least one container. The following volumes will be removed:") if err != nil { return err } - listOptions.Filter, err = filters.ParseFilterArgumentsIntoFilters(filter) + listOptions.Filter, err = parse.FilterArgumentsIntoFilters(filter) if err != nil { return err } -- cgit v1.2.3-54-g00ecf