All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: Ross Burton <ross.burton@arm.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
Date: Wed, 9 Feb 2022 12:36:16 -0500	[thread overview]
Message-ID: <CADkTA4NG8wAoMQtpwbvf2hia23JnGsbboERY4H61GxMpyms5JQ@mail.gmail.com> (raw)
In-Reply-To: <20220209173036.3823144-2-ross.burton@arm.com>

On Wed, Feb 9, 2022 at 12:30 PM Ross Burton <ross.burton@arm.com> wrote:
>
> Currently each split-out kernel module RDEPENDS on the top-level kernel
> package (e.g. kernel-5.15-yocto-standard). Whilst at first this seems
> correct, as modules obviously need their matching kernel, there are many
> situations where the kernel is provided out-of-band and forcing the
> kernel in via RDEPENDS in the wrong thing to do, for example an
> initramfs really shouldn't contain a kernel image, but can contain
> kernel modules.
>
> Change the module splitting logic to use RRECOMMENDS instead of
> RDEPENDS, and tighten the dependency to kernel-image instead of kernel
> to pull in just the image, which also means PACKAGE_EXCLUDE =
> "kernel-image-*" is sufficient to ensure the image doesn't get pulled
> into an image.
>

As much as I hate to suggest it, I think the strength of the image
dependency needs to be configurable. I know of situations were
rrecommends are disabled AND they use quite a few out of tree
modules. While I can't say that they are counting on RDEPENDS
heavily in this situation, I also can't rule it out .. so this is a breaking
change in behaviour for those configurations.

That being said, if RP doesn't want/like a conditional at this particular
spot, I can understand that as well .. and am happy to be ignored
in that case :)

Bruce

> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/classes/kernel-module-split.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
> index a29c294810e..4429fee4b51 100644
> --- a/meta/classes/kernel-module-split.bbclass
> +++ b/meta/classes/kernel-module-split.bbclass
> @@ -175,7 +175,7 @@ python split_kernel_module_packages () {
>      module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
>      module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
>
> -    modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
> +    modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_recommends='%s-image-%s' % (kernel_package_name, kernel_version))
>      if modules:
>          d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
>
> --
> 2.25.1
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


  reply	other threads:[~2022-02-09 17:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 17:30 [PATCH 1/2] package: add extra_recommends to do_split_package() Ross Burton
2022-02-09 17:30 ` [PATCH 2/2] kernel-module-split: modules should recommend the kernel image Ross Burton
2022-02-09 17:36   ` Bruce Ashfield [this message]
2022-02-09 17:56     ` [OE-core] " Khem Raj
2022-02-09 18:03       ` Bruce Ashfield
2022-02-09 19:13     ` Richard Purdie
2022-02-09 20:10       ` Bruce Ashfield
2022-02-10 10:52         ` Ross Burton
2022-02-10 10:54           ` Richard Purdie
2022-02-10 11:45             ` Ross Burton

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=CADkTA4NG8wAoMQtpwbvf2hia23JnGsbboERY4H61GxMpyms5JQ@mail.gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@arm.com \
    /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.