Merge pull request #7734 from lsm5/fix-build-with-varlink

fix build with varlink
This commit is contained in:
OpenShift Merge Robot 2020-09-22 23:47:59 +00:00 committed by GitHub
commit 5cedd830f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -123,6 +123,7 @@ gating_task:
# N/B: need 'clean' so some committed files are re-generated.
- '/usr/local/bin/entrypoint.sh clean podman-remote |& ${TIMESTAMP}'
- '/usr/local/bin/entrypoint.sh clean podman xref_helpmsgs_manpages BUILDTAGS="exclude_graphdriver_devicemapper selinux seccomp" |& ${TIMESTAMP}'
- '/usr/local/bin/entrypoint.sh clean BUILDTAGS="varlink" binaries |& ${TIMESTAMP}'
- '/usr/local/bin/entrypoint.sh local-cross |& ${TIMESTAMP}'
# Verify some aspects of ci/related scripts

View File

@ -7,6 +7,7 @@ import (
"fmt"
"os"
goruntime "runtime"
"strconv"
"time"
"github.com/containers/image/v5/pkg/sysregistriesv2"
@ -22,13 +23,18 @@ func (i *VarlinkAPI) GetVersion(call iopodman.VarlinkCall) error {
return err
}
int64APIVersion, err := strconv.ParseInt(versionInfo.APIVersion, 10, 64)
if err != nil {
return err
}
return call.ReplyGetVersion(
versionInfo.Version,
versionInfo.GoVersion,
versionInfo.GitCommit,
time.Unix(versionInfo.Built, 0).Format(time.RFC3339),
versionInfo.OsArch,
versionInfo.APIVersion,
int64APIVersion,
)
}