From 538087d2036d9dd319e3a22aaa2f62e5a5285c55 Mon Sep 17 00:00:00 2001
From: Joshua Lock <josh@linux.intel.com>
Date: Thu, 4 Mar 2010 16:53:00 +0000
Subject: packaged-staging: Fix packagaging of cross packages

packagedstaging_fastpath() was only copying the contents of CROSS_DIR to
PSTAGE_TMPDIR resulting in the folders contents being packaged and then
installed incorrectly at the top level of CROSS_DIR rather than in HOST_ARCH
specific sub directories.

This patch fixes that issue by copying the directory and its contents rather
than just the directory contents.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/packaged-staging.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'meta/classes')

diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index 3815f6f2e..fca681864 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -321,7 +321,9 @@ packagedstaging_fastpath () {
 		mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
 		mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/
 		cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true
-		cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR}/* ${PSTAGE_TMPDIR_STAGE}/cross/ || /bin/true
+                # CROSS_DIR is just the HOST_ARCH specific stuff and a sub
+                # directory of cross so copy it *and* its contents
+		cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR} ${PSTAGE_TMPDIR_STAGE}/cross/ || /bin/true
 	fi
 }
 
-- 
cgit v1.2.3