* [PATCH] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory @ 2014-02-18 12:08 Jonathan Liu 2014-02-18 14:56 ` Khem Raj 0 siblings, 1 reply; 3+ messages in thread From: Jonathan Liu @ 2014-02-18 12:08 UTC (permalink / raw) To: openembedded-core 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. Signed-off-by: Jonathan Liu <net147@gmail.com> --- meta/classes/image_types.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 944e6db..747a59b 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -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}" -- 1.8.5.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory 2014-02-18 12:08 [PATCH] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory Jonathan Liu @ 2014-02-18 14:56 ` Khem Raj 2014-02-18 20:23 ` Bernhard Reutner-Fischer 0 siblings, 1 reply; 3+ messages in thread From: Khem Raj @ 2014-02-18 14:56 UTC (permalink / raw) To: Jonathan Liu; +Cc: Patches and discussions about the oe-core layer On Tue, Feb 18, 2014 at 4:08 AM, Jonathan Liu <net147@gmail.com> wrote: > } > 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)) > } > this would fork a new shell. you could also do something like cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) && cd - ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory 2014-02-18 14:56 ` Khem Raj @ 2014-02-18 20:23 ` Bernhard Reutner-Fischer 0 siblings, 0 replies; 3+ messages in thread From: Bernhard Reutner-Fischer @ 2014-02-18 20:23 UTC (permalink / raw) To: Khem Raj, Jonathan Liu; +Cc: Patches and discussions about the oe-core layer On 18 February 2014 15:56:41 Khem Raj <raj.khem@gmail.com> wrote: > On Tue, Feb 18, 2014 at 4:08 AM, Jonathan Liu <net147@gmail.com> wrote: > > } > > 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)) > > } > > > > this would fork a new shell. you could also do something like > cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc > >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) && cd - Or just pull the cd into the find subshell... ;) > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core Sent with AquaMail for Android http://www.aqua-mail.com ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-18 20:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-02-18 12:08 [PATCH] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory Jonathan Liu 2014-02-18 14:56 ` Khem Raj 2014-02-18 20:23 ` Bernhard Reutner-Fischer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox