From 45fd58d11cc4e74a703ea87551e43670441bbdfe Mon Sep 17 00:00:00 2001 From: bin Date: Thu, 10 Jun 2021 16:36:24 +0800 Subject: [PATCH] osbuilder: fix log message that is not error but seems like an error Only show checkout failed message if AGENT_VERSION is set and the checkout is failed. Fixes: #1989 Signed-off-by: bin --- tools/osbuilder/rootfs-builder/rootfs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 9fbe49bad1..34c625f6ed 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -584,7 +584,9 @@ EOT info "Build agent" pushd "${agent_dir}" - [ -n "${AGENT_VERSION}" ] && git checkout "${AGENT_VERSION}" && OK "git checkout successful" || info "checkout failed!" + if [ -n "${AGENT_VERSION}" ]; then + git checkout "${AGENT_VERSION}" && OK "git checkout successful" || die "checkout agent ${AGENT_VERSION} failed!" + fi make clean make LIBC=${LIBC} INIT=${AGENT_INIT} make install DESTDIR="${ROOTFS_DIR}" LIBC=${LIBC} INIT=${AGENT_INIT} SECCOMP=${SECCOMP}