Skip to contentSkip to conversation

image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory

PATCH New Jonathan Liu 1 participant 1 message Feb 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v3 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 9577b1f..602c1f0 100644
@@ -70,7 +70,7 @@ IMAGE_CMD_cpio () {
 	if [ ! -L ${IMAGE_ROOTFS}/init ]; then
 		touch ${IMAGE_ROOTFS}/init
 	fi
-	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