aboutsummaryrefslogtreecommitdiff
path: root/libpod/oci_linux.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-06-24 15:48:34 -0500
committerbaude <bbaude@redhat.com>2019-06-25 13:51:24 -0500
commitdd81a44ccfa34585ef62319835c8bb421db9e334 (patch)
tree7bab006a56d5823ccdf7b8cf6e59502ee954a979 /libpod/oci_linux.go
parenta1a4a75abee2c381483a218e1660621ee416ef7c (diff)
downloadpodman-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/oci_linux.go')
-rw-r--r--libpod/oci_linux.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go
index 6e84c0759..45480c890 100644
--- a/libpod/oci_linux.go
+++ b/libpod/oci_linux.go
@@ -16,6 +16,7 @@ import (
"time"
"github.com/containerd/cgroups"
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/rootless"
"github.com/containers/libpod/pkg/util"
"github.com/containers/libpod/utils"
@@ -430,19 +431,19 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
if err == nil {
var ociErr ociError
if err := json.Unmarshal(data, &ociErr); err == nil {
- return errors.Wrapf(ErrOCIRuntime, "%s", strings.Trim(ociErr.Msg, "\n"))
+ return errors.Wrapf(define.ErrOCIRuntime, "%s", strings.Trim(ociErr.Msg, "\n"))
}
}
}
// If we failed to parse the JSON errors, then print the output as it is
if ss.si.Message != "" {
- return errors.Wrapf(ErrOCIRuntime, "%s", ss.si.Message)
+ return errors.Wrapf(define.ErrOCIRuntime, "%s", ss.si.Message)
}
- return errors.Wrapf(ErrInternal, "container create failed")
+ return errors.Wrapf(define.ErrInternal, "container create failed")
}
ctr.state.PID = ss.si.Pid
case <-time.After(ContainerCreateTimeout):
- return errors.Wrapf(ErrInternal, "container creation timeout")
+ return errors.Wrapf(define.ErrInternal, "container creation timeout")
}
return nil
}