From: Martin Jansa Date: Mon, 15 May 2023 17:37:39 +0000 (+0200) Subject: go.bbclass: don't use test to check output from ls X-Git-Tag: 2020-04.27-dunfell~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=236a3e0bf753669b4fddbd91be5fdb10c2e6093f;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git go.bbclass: don't use test to check output from ls * avoids possibly confusing error message in log.do_install like: ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory Signed-off-by: Martin Jansa Signed-off-by: Alexandre Belloni (cherry picked from commit 2f1777e6ac5269a71203b6a2c562a43503be95ae) Signed-off-by: Steve Sakoman --- diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 16e46398b19..21b1a0271e0 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -118,7 +118,7 @@ go_do_install() { tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \ tar -C ${D}${libdir}/go --no-same-owner -xf - - if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then + if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then install -d ${D}${bindir} install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/ fi