mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
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>
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/containers/image/signature"
|
||||
"github.com/containers/image/types"
|
||||
"github.com/containers/libpod/libpod/define"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
spec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/pkg/errors"
|
||||
@ -126,7 +127,7 @@ func WaitForFile(path string, chWait chan error, timeout time.Duration) (bool, e
|
||||
return false, errors.Wrapf(err, "checking file %s", path)
|
||||
}
|
||||
case <-timeoutChan:
|
||||
return false, errors.Wrapf(ErrInternal, "timed out waiting for file %s", path)
|
||||
return false, errors.Wrapf(define.ErrInternal, "timed out waiting for file %s", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -156,15 +157,15 @@ func sortMounts(m []spec.Mount) []spec.Mount {
|
||||
|
||||
func validPodNSOption(p *Pod, ctrPod string) error {
|
||||
if p == nil {
|
||||
return errors.Wrapf(ErrInvalidArg, "pod passed in was nil. Container may not be associated with a pod")
|
||||
return errors.Wrapf(define.ErrInvalidArg, "pod passed in was nil. Container may not be associated with a pod")
|
||||
}
|
||||
|
||||
if ctrPod == "" {
|
||||
return errors.Wrapf(ErrInvalidArg, "container is not a member of any pod")
|
||||
return errors.Wrapf(define.ErrInvalidArg, "container is not a member of any pod")
|
||||
}
|
||||
|
||||
if ctrPod != p.ID() {
|
||||
return errors.Wrapf(ErrInvalidArg, "pod passed in is not the pod the container is associated with")
|
||||
return errors.Wrapf(define.ErrInvalidArg, "pod passed in is not the pod the container is associated with")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user