[OE-core] [PATCH 1/1] self-hosted-image: pre-populate the builder user with poky source
Dexuan Cui
dexuan.cui at intel.com
Sun Mar 18 05:41:24 UTC 2012
[YOCTO #2065]
Signed-off-by: Dexuan Cui <dexuan.cui at intel.com>
---
meta/recipes-core/images/self-hosted-image.bb | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb
index d56c2cb..7f5173a 100644
--- a/meta/recipes-core/images/self-hosted-image.bb
+++ b/meta/recipes-core/images/self-hosted-image.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r5"
+PR = "r6"
CORE_IMAGE_EXTRA_INSTALL = "\
task-self-hosted \
@@ -21,3 +21,24 @@ APPEND += "quiet"
IMAGE_FSTYPES = "vmdk"
inherit core-image
+
+SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
+SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
+
+fakeroot do_populate_poky_src () {
+ # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
+ # will become invalid in the target.
+ rm -rf ${WORKDIR}/git/.git
+ rm -f ${WORKDIR}/git/.gitignore
+
+ cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+ chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+
+python do_get_poky_src () {
+ bb.build.exec_func('base_do_fetch', d)
+ bb.build.exec_func('base_do_unpack', d)
+}
+addtask do_get_poky_src before do_rootfs
--
1.7.6
More information about the Openembedded-core
mailing list