All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] package: add extra_recommends to do_split_package()
@ 2022-02-09 17:30 Ross Burton
  2022-02-09 17:30 ` [PATCH 2/2] kernel-module-split: modules should recommend the kernel image Ross Burton
  0 siblings, 1 reply; 10+ messages in thread
From: Ross Burton @ 2022-02-09 17:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield

It may be preferrable to add RRECOMMENDS instead of RDEPENDS to each of
the split packages, so add extra_recommends to do this.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes/package.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index f4a661ba25a..2143abca0d1 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -79,7 +79,7 @@ def legitimize_package_name(s):
     # Remaining package name validity fixes
     return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
 
-def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False, summary=None):
+def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, extra_recommends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False, summary=None):
     """
     Used in .bb files to split up dynamically generated subpackages of a
     given package, usually plugins or modules.
@@ -108,6 +108,8 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
                       all packages. The default value of None causes a
                       dependency on the main package (${PN}) - if you do
                       not want this, pass '' for this parameter.
+    extra_recommends -- extra runtime recommends (RRECOMMENDS) to be set for
+                      all packages. By default no recommends are added.
     aux_files_pattern -- extra item(s) to be added to FILES for each
                       package. Can be a single string item or a list of
                       strings for multiple items.  Must include %s.
@@ -222,6 +224,8 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
             d.setVar('FILES:' + pkg, oldfiles + " " + newfile)
         if extra_depends != '':
             d.appendVar('RDEPENDS:' + pkg, ' ' + extra_depends)
+        if extra_recommends:
+            d.appendVar('RRECOMMENDS:' + pkg, ' ' + extra_recommends)
         if not d.getVar('DESCRIPTION:' + pkg):
             d.setVar('DESCRIPTION:' + pkg, description % on)
         if not d.getVar('SUMMARY:' + pkg):
-- 
2.25.1



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

* [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 17:30 [PATCH 1/2] package: add extra_recommends to do_split_package() Ross Burton
@ 2022-02-09 17:30 ` Ross Burton
  2022-02-09 17:36   ` Bruce Ashfield
  0 siblings, 1 reply; 10+ messages in thread
From: Ross Burton @ 2022-02-09 17:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: bruce.ashfield

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.

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



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

* Re: [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  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
  2022-02-09 17:56     ` [OE-core] " Khem Raj
  2022-02-09 19:13     ` Richard Purdie
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-02-09 17:36 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer

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


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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 17:36   ` Bruce Ashfield
@ 2022-02-09 17:56     ` Khem Raj
  2022-02-09 18:03       ` Bruce Ashfield
  2022-02-09 19:13     ` Richard Purdie
  1 sibling, 1 reply; 10+ messages in thread
From: Khem Raj @ 2022-02-09 17:56 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Ross Burton, Patches and discussions about the oe-core layer

On Wed, Feb 9, 2022 at 9:36 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
> 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 :)

I see that this change eases container image generation. I would be inclined
to support this change.

>
> 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
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#161577): https://lists.openembedded.org/g/openembedded-core/message/161577
> Mute This Topic: https://lists.openembedded.org/mt/89026749/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 17:56     ` [OE-core] " Khem Raj
@ 2022-02-09 18:03       ` Bruce Ashfield
  0 siblings, 0 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-02-09 18:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: Ross Burton, Patches and discussions about the oe-core layer

On Wed, Feb 9, 2022 at 12:57 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Wed, Feb 9, 2022 at 9:36 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> >
> > 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 :)
>
> I see that this change eases container image generation. I would be inclined
> to support this change.

To be clear, i think the change is fine as well .. I'm simply saying,
it should be configurable, as we are potential breaking the existing
use case for another.

Cheers,

Bruce

>
> >
> > 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
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#161577): https://lists.openembedded.org/g/openembedded-core/message/161577
> > Mute This Topic: https://lists.openembedded.org/mt/89026749/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >



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


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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 17:36   ` Bruce Ashfield
  2022-02-09 17:56     ` [OE-core] " Khem Raj
@ 2022-02-09 19:13     ` Richard Purdie
  2022-02-09 20:10       ` Bruce Ashfield
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2022-02-09 19:13 UTC (permalink / raw)
  To: Bruce Ashfield, Ross Burton
  Cc: Patches and discussions about the oe-core layer

On Wed, 2022-02-09 at 12:36 -0500, Bruce Ashfield wrote:
> 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 :)

Isn't there a case where the main kernel "image" package is empty so you just
have to break the dependency at the main image level rather than messing with
the modules? or am I half remembering something badly?

Cheers,

Richard



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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 19:13     ` Richard Purdie
@ 2022-02-09 20:10       ` Bruce Ashfield
  2022-02-10 10:52         ` Ross Burton
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Ashfield @ 2022-02-09 20:10 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Ross Burton, Patches and discussions about the oe-core layer

On Wed, Feb 9, 2022 at 2:13 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2022-02-09 at 12:36 -0500, Bruce Ashfield wrote:
> > 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 :)
>
> Isn't there a case where the main kernel "image" package is empty so you just
> have to break the dependency at the main image level rather than messing with
> the modules? or am I half remembering something badly?

I've always just used this (from kernel.bbclass):

# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image
(= ${EXTENDPKGV})"

Maybe that's the one you are remembering ?

Bruce

>
> Cheers,
>
> Richard
>


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


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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-09 20:10       ` Bruce Ashfield
@ 2022-02-10 10:52         ` Ross Burton
  2022-02-10 10:54           ` Richard Purdie
  0 siblings, 1 reply; 10+ messages in thread
From: Ross Burton @ 2022-02-10 10:52 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Richard Purdie, Patches and discussions about the oe-core layer

On Wed, 9 Feb 2022 at 20:10, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> I've always just used this (from kernel.bbclass):
>
> # Allow machines to override this dependency if kernel image files are
> # not wanted in images as standard
> RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image
> (= ${EXTENDPKGV})"
>
> Maybe that's the one you are remembering ?

Obviously this won't work in the situations where you want a normal
image with a kernel but also a initramfs with a kernel module in it,
as that behaviour isn't machine specific but image specific.

If this was a recommends then it could be removed via PACKAGE_EXCLUDE,
but we'd need to be sure that nothing from the kernel ended up getting
pulled in via a single module.

Ross


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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-10 10:52         ` Ross Burton
@ 2022-02-10 10:54           ` Richard Purdie
  2022-02-10 11:45             ` Ross Burton
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2022-02-10 10:54 UTC (permalink / raw)
  To: Ross Burton, Bruce Ashfield
  Cc: Patches and discussions about the oe-core layer

On Thu, 2022-02-10 at 10:52 +0000, Ross Burton wrote:
> On Wed, 9 Feb 2022 at 20:10, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> > I've always just used this (from kernel.bbclass):
> > 
> > # Allow machines to override this dependency if kernel image files are
> > # not wanted in images as standard
> > RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image
> > (= ${EXTENDPKGV})"
> > 
> > Maybe that's the one you are remembering ?
> 
> Obviously this won't work in the situations where you want a normal
> image with a kernel but also a initramfs with a kernel module in it,
> as that behaviour isn't machine specific but image specific.
> 
> If this was a recommends then it could be removed via PACKAGE_EXCLUDE,
> but we'd need to be sure that nothing from the kernel ended up getting
> pulled in via a single module.

I think making this a RRECOMMENDS and doing that may enable more workflows and
make things easier all around. Can you check and see if it does pull other
unwanted stuff in? I'm hoping it doesn't.

Cheers,

Richard



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

* Re: [OE-core] [PATCH 2/2] kernel-module-split: modules should recommend the kernel image
  2022-02-10 10:54           ` Richard Purdie
@ 2022-02-10 11:45             ` Ross Burton
  0 siblings, 0 replies; 10+ messages in thread
From: Ross Burton @ 2022-02-10 11:45 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Bruce Ashfield, Patches and discussions about the oe-core layer

On Thu, 10 Feb 2022 at 10:54, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> > Obviously this won't work in the situations where you want a normal
> > image with a kernel but also a initramfs with a kernel module in it,
> > as that behaviour isn't machine specific but image specific.
> >
> > If this was a recommends then it could be removed via PACKAGE_EXCLUDE,
> > but we'd need to be sure that nothing from the kernel ended up getting
> > pulled in via a single module.
>
> I think making this a RRECOMMENDS and doing that may enable more workflows and
> make things easier all around. Can you check and see if it does pull other
> unwanted stuff in? I'm hoping it doesn't.

Tested.  Our initramfs pulls in a kernel module, and
PACKAGE_EXCLUDE=kernel-image-* stops the image itself being pulled in.
It does pull in the kernel-5.15-yocto-standard package, but that just
contains a few module config files.

Patch incoming!

Ross


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

end of thread, other threads:[~2022-02-10 11:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.