diff options
author | baude <bbaude@redhat.com> | 2019-06-24 15:48:34 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-06-25 13:51:24 -0500 |
commit | dd81a44ccfa34585ef62319835c8bb421db9e334 (patch) | |
tree | 7bab006a56d5823ccdf7b8cf6e59502ee954a979 /libpod/container_internal_linux.go | |
parent | a1a4a75abee2c381483a218e1660621ee416ef7c (diff) | |
download | podman-dd81a44ccfa34585ef62319835c8bb421db9e334.tar.gz podman-dd81a44ccfa34585ef62319835c8bb421db9e334.tar.bz2 podman-dd81a44ccfa34585ef62319835c8bb421db9e334.zip |
remove libpod from main
the compilation demands of having libpod in main is a burden for the
remote client compilations. to combat this, we should move the use of
libpod structs, vars, constants, and functions into the adapter code
where it will only be compiled by the local client.
this should result in cleaner code organization and smaller binaries. it
should also help if we ever need to compile the remote client on
non-Linux operating systems natively (not cross-compiled).
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 50a2e2d44..1ea858886 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -20,6 +20,7 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/plugins/pkg/ns" "github.com/containers/buildah/pkg/secrets" + "github.com/containers/libpod/libpod/define" crioAnnotations "github.com/containers/libpod/pkg/annotations" "github.com/containers/libpod/pkg/apparmor" "github.com/containers/libpod/pkg/criu" @@ -568,7 +569,7 @@ func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointO } if c.state.State != ContainerStateRunning { - return errors.Wrapf(ErrCtrStateInvalid, "%q is not running, cannot checkpoint", c.state.State) + return errors.Wrapf(define.ErrCtrStateInvalid, "%q is not running, cannot checkpoint", c.state.State) } if err := c.checkpointRestoreLabelLog("dump.log"); err != nil { @@ -659,7 +660,7 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti } if (c.state.State != ContainerStateConfigured) && (c.state.State != ContainerStateExited) { - return errors.Wrapf(ErrCtrStateInvalid, "container %s is running or paused, cannot restore", c.ID()) + return errors.Wrapf(define.ErrCtrStateInvalid, "container %s is running or paused, cannot restore", c.ID()) } if options.TargetFile != "" { |