Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [meta-oe][PATCH v3] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory
  2014-02-21  4:41 [meta-oe][PATCH v3] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory Jonathan Liu
@ 2014-02-21  4:38 ` Jonathan Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Liu @ 2014-02-21  4:38 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

Whoops, wrong tag. This was meant for OE-core. Resubmitting.

Regards,
Jonathan

On 21 February 2014 15:41, Jonathan Liu <net147@gmail.com> wrote:
> 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 9577b1f..602c1f0 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -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}"
> --
> 1.8.5.4
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [meta-oe][PATCH v3] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory
@ 2014-02-21  4:41 Jonathan Liu
  2014-02-21  4:38 ` Jonathan Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Liu @ 2014-02-21  4:41 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 9577b1f..602c1f0 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -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}"
-- 
1.8.5.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-21  4:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21  4:41 [meta-oe][PATCH v3] image_types.bbclass: fix cpio IMAGE_CMD to preserve working directory Jonathan Liu
2014-02-21  4:38 ` Jonathan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox