Skip to contentSkip to conversation

go.bbclass: don't use test to check output from ls

PATCH New Martin Jansa 1 participant 2 messages May 15, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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

---
 meta/classes-recipe/go.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/go.bbclass +1 -1
index b02a83a561..39bfaa5156 100644
@@ -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
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/2 image-live.bbclass: respect IMAGE_MACHINE_SUFFIX

* fixes:
ERROR: core-image-minimal-1.0-r0 do_bootimg: /OE/build/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-initramfs-qemux86-64.cpio.gz is invalid. initrd image creation failed.
ERROR: core-image-minimal-1.0-r0 do_bootimg: ExecutionError('/OE/build/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.build_hddimg.2001892', 1, None, None) when IMAGE_MACHINE_SUFFIX is set to empty in local.conf

---
 meta/classes-recipe/image-live.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/image-live.bbclass +1 -1
index b95e714258..95dd44a8c0 100644
@@ -38,7 +38,7 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
 LABELS_LIVE ?= "boot install"
 ROOT_LIVE ?= "root=/dev/ram0"
 INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs"
-INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}"
+INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}${IMAGE_MACHINE_SUFFIX}.${INITRAMFS_FSTYPES}"
 
 LIVE_ROOTFS_TYPE ?= "ext4"
 ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}"
Signature · 1 line
2.40.1