All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] archiver.bbclass: do checkout for kernel
@ 2015-11-02  6:23 Jian Liu
  2015-11-02 21:30 ` Khem Raj
  2015-12-16 22:29 ` Burton, Ross
  0 siblings, 2 replies; 10+ messages in thread
From: Jian Liu @ 2015-11-02  6:23 UTC (permalink / raw)
  To: openembedded-core

The repo of kernel is bare git repository and we need to checkout to get
the source code.

Signed-off-by: Jian Liu <jian.liu@windriver.com>

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..7387fbf 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -66,6 +66,11 @@ python () {
     ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)
 
     if ar_src == "original":
+        # For kernel, it is bare repo, we need to checkout
+        if bb.data.inherits_class('kernel-yocto', d):
+            bb.build.addtask('do_ar_original', 'do_kernel_metadata', 'do_validate_branches', d)
+        else:
+            bb.build.addtask('do_ar_original', None, 'do_unpack', d)
         d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn)
     elif ar_src == "patched":
         d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' % pn)
@@ -113,6 +118,12 @@ python do_ar_original() {
 
     ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
     bb.note('Archiving the original source...')
+    # For kernel, the source code is shared
+    if bb.data.inherits_class('kernel-yocto', d):
+        srcdir = d.getVar('S', True)
+        create_tarball(d, srcdir, 'original', ar_outdir)
+        return
+
     fetch = bb.fetch2.Fetch([], d)
     for url in fetch.urls:
         local = fetch.localpath(url).rstrip("/");
@@ -346,7 +357,6 @@ python do_deploy_archives_setscene () {
 do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}"
 do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
 
-addtask do_ar_original after do_unpack
 addtask do_ar_patched after do_unpack_and_patch
 addtask do_ar_configured after do_unpack_and_patch
 addtask do_dumpdata


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

end of thread, other threads:[~2015-12-18  3:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02  6:23 [PATCH] archiver.bbclass: do checkout for kernel Jian Liu
2015-11-02 21:30 ` Khem Raj
2015-11-03  9:22   ` Jian Liu
2015-11-04  5:57     ` Khem Raj
2015-11-05  2:14       ` Jian Liu
2015-11-05  2:22         ` Khem Raj
2015-11-13  8:16           ` Jian Liu
2015-12-14  5:37             ` Jian Liu
2015-12-16 22:29 ` Burton, Ross
2015-12-18  3:31   ` Jian Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.