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: uninative-3.10~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f1777e6ac5269a71203b6a2c562a43503be95ae;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 --- diff --git a/meta/classes-recipe/go.bbclass b/meta/classes-recipe/go.bbclass index b02a83a5610..39bfaa51568 100644 --- a/meta/classes-recipe/go.bbclass +++ b/meta/classes-recipe/go.bbclass @@ -132,7 +132,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