Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stefan Stanacar <sstncr@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [morty][PATCH] kernel.bbclass: Fix symlink creation when using externalsrc
Date: Thu, 11 Jan 2018 16:07:21 +0000	[thread overview]
Message-ID: <1515686841-28097-2-git-send-email-sstncr@gmail.com> (raw)
In-Reply-To: <1515686841-28097-1-git-send-email-sstncr@gmail.com>

do_unpack is by default in SRCTREECOVEREDTASKS so this append can't run, since
this tasks gets removed by externalsrc when it's enabled.

However this was hidden because externalsrc does run do_fetch and do_unpack if
there are type=kmeta or file:// entries in the SRC_URI value of the kernel recipe.
(e.g linux-yocto).

Make this a separate task so that it actually gets run for kernel recipes with
no file:// or type=kmeta in SRC_URI.

Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
---
 meta/classes/kernel.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index f8318b8..3eaae03 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -102,7 +102,7 @@ inherit ${KERNEL_CLASSES}
 # the symlink.
 do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
 do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
-base_do_unpack_append () {
+python do_symlink_staging_dir () {
     s = d.getVar("S", True)
     if s[-1] == '/':
         # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
@@ -119,6 +119,8 @@ base_do_unpack_append () {
             shutil.move(s, kernsrc)
             os.symlink(kernsrc, s)
 }
+addtask do_symlink_staging_dir after do_unpack before do_patch do_configure
+
 
 inherit kernel-arch deploy
 
-- 
2.7.4



  reply	other threads:[~2018-01-11 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 16:07 [morty][PATCH] kernelsrc/perf: fix dependency on non existant task when using externalsrc Stefan Stanacar
2018-01-11 16:07 ` Stefan Stanacar [this message]
2018-01-17 19:04   ` [morty][PATCH] kernel.bbclass: Fix symlink creation " akuster808
2018-01-18 16:41     ` Stefan Stanacar
2018-01-12 16:21 ` [morty][PATCH] kernelsrc/perf: fix dependency on non existant task " Joshua Watt
2018-01-12 17:01   ` Stefan Stanacar
  -- strict thread matches above, loose matches on Subject: below --
2018-01-29 14:39 [morty][PATCH] kernel.bbclass: Fix symlink creation " Stefan Stanacar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1515686841-28097-2-git-send-email-sstncr@gmail.com \
    --to=sstncr@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox