All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrea Adami" <andrea.adami@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][PATCH 1/2] kernel.bbclass: run read_package_metadata only if packaging is enabled
Date: Wed, 23 Jun 2021 00:18:17 +0200	[thread overview]
Message-ID: <20210622221818.4613-1-andrea.adami@gmail.com> (raw)

As exposed in the ML
https://lists.openembedded.org/g/openembedded-core/message/153000

up to commit 86142da in Gatesgarth it was possible to build a second mini-kernel w/out
modules to be just deployed and collected by other recipes.

These kernels use special care to avoid packaging:

inherit nopackages

PACKAGES = ""
PROVIDES = ""

Now the change in kernel.bblass calls a packaging routine:
do_deploy[prefuncs] += "read_subpackage_metadata"

As a result the kernel build fails.

Fix this using bb.data.inherits_class() to verify the
possible previous inherit of nopackages.bbclass.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 meta/classes/kernel.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 379bed44f2..06e6446a08 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -771,8 +771,8 @@ kernel_do_deploy() {
 }
 
 # We deploy to filenames that include PKGV and PKGR, read the saved data to
-# ensure we get the right values for both
-do_deploy[prefuncs] += "read_subpackage_metadata"
+# ensure we get the right values for both. Do this only if packaging is enabled.
+do_deploy[prefuncs] += "${@ '' if bb.data.inherits_class('nopackages', d) else 'read_subpackage_metadata' }"
 
 addtask deploy after do_populate_sysroot do_packagedata
 
-- 
2.17.1


             reply	other threads:[~2021-06-22 22:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 22:18 Andrea Adami [this message]
2021-06-22 22:18 ` [OE-core][PATCH 2/2] kernel.bbclass: inherit kernel_devicetree only if KERNEL_DEVICETREE is set Andrea Adami
2021-06-23  9:32   ` Peter Kjellerstedt
2021-06-23 13:12     ` Andrea Adami
2021-06-23 13:51       ` Andrey Zhizhikin
2021-06-23 15:22         ` Andrea Adami
2021-06-23 16:02           ` Martin Jansa
2021-06-23 19:26             ` Andrea Adami
2021-06-22 22:52 ` [OE-core][PATCH 1/2] kernel.bbclass: run read_package_metadata only if packaging is enabled Richard Purdie
2021-06-22 22:59   ` Andrea Adami

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=20210622221818.4613-1-andrea.adami@gmail.com \
    --to=andrea.adami@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 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.