Skip to contentSkip to conversation

image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory

PATCH Superseded Jonathan Liu 1 participant 1 message Feb 18, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory

The working directory is changed in a subshell when executing cpio to preserve the working directory for any subsequent commands. This is to keep the working directory consistent when generating multiple image types.

---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image_types.bbclass +1 -1
index 944e6db..1f2a681 100644
@@ -74,7 +74,7 @@ CPIO_TOUCH_INIT () {
 }
 IMAGE_CMD_cpio () {
 	${CPIO_TOUCH_INIT}
-	cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
+	(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
 }
 
 ELF_KERNEL ?= "${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE}"
Signature · 1 line
1.8.5.4