linux-dummy: Add package kernel

Submitted by zhe.he@windriver.com on Oct. 31, 2019, 10:20 a.m. | Patch ID: 166427

Details

Message ID 1572517219-382824-1-git-send-email-zhe.he@windriver.com
State New
Headers show

Commit Message

zhe.he@windriver.com Oct. 31, 2019, 10:20 a.m.
From: He Zhe <zhe.he@windriver.com>

Some package like packagegroup-core-boot may ask for package kernel. Let
linux-dummy rprovide package kernel to fix the following build failure.

ERROR: Nothing RPROVIDES 'kernel' (but
.../meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or
otherwise requires it)

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 meta/recipes-kernel/linux/linux-dummy.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 62cf6f5ea6..20d7ed815d 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -8,19 +8,22 @@  LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
 
 PROVIDES += "virtual/kernel"
+RPROVIDES_${PN} += "kernel lib32-kernel"
 
 PACKAGES_DYNAMIC += "^kernel-module-.*"
 PACKAGES_DYNAMIC += "^kernel-image-.*"
 PACKAGES_DYNAMIC += "^kernel-firmware-.*"
 
-PACKAGES += "kernel-modules kernel-vmlinux"
+PACKAGES += "kernel-modules kernel-vmlinux kernel"
 FILES_kernel-modules = ""
 ALLOW_EMPTY_kernel-modules = "1"
 DESCRIPTION_kernel-modules = "Kernel modules meta package"
 FILES_kernel-vmlinux = ""
 ALLOW_EMPTY_kernel-vmlinux = "1"
 DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
-
+FILES_kernel = ""
+ALLOW_EMPTY_kernel = "1"
+DESCRIPTION_kernel = "Kernel meta package"
 
 INHIBIT_DEFAULT_DEPS = "1"
 

Comments

Bruce Ashfield Oct. 31, 2019, 10:57 a.m.
On Thu, Oct 31, 2019 at 6:20 AM <zhe.he@windriver.com> wrote:
>
> From: He Zhe <zhe.he@windriver.com>
>
> Some package like packagegroup-core-boot may ask for package kernel. Let
> linux-dummy rprovide package kernel to fix the following build failure.
>
> ERROR: Nothing RPROVIDES 'kernel' (but
> .../meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or
> otherwise requires it)

Can you expand on what the higher level use case is that something is
using packagegroup-core-boot (or whatever), but also linux-dummy ?

It seems like this is going to hide misconfigurations .. since you may
want something bootable, but yet are not properly configured.

If there's part of that packagroup you need, why not split it up,
rather than masking the symptom seen here ?

Bruce

>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  meta/recipes-kernel/linux/linux-dummy.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
> index 62cf6f5ea6..20d7ed815d 100644
> --- a/meta/recipes-kernel/linux/linux-dummy.bb
> +++ b/meta/recipes-kernel/linux/linux-dummy.bb
> @@ -8,19 +8,22 @@ LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
>
>  PROVIDES += "virtual/kernel"
> +RPROVIDES_${PN} += "kernel lib32-kernel"
>
>  PACKAGES_DYNAMIC += "^kernel-module-.*"
>  PACKAGES_DYNAMIC += "^kernel-image-.*"
>  PACKAGES_DYNAMIC += "^kernel-firmware-.*"
>
> -PACKAGES += "kernel-modules kernel-vmlinux"
> +PACKAGES += "kernel-modules kernel-vmlinux kernel"
>  FILES_kernel-modules = ""
>  ALLOW_EMPTY_kernel-modules = "1"
>  DESCRIPTION_kernel-modules = "Kernel modules meta package"
>  FILES_kernel-vmlinux = ""
>  ALLOW_EMPTY_kernel-vmlinux = "1"
>  DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
> -
> +FILES_kernel = ""
> +ALLOW_EMPTY_kernel = "1"
> +DESCRIPTION_kernel = "Kernel meta package"
>
>  INHIBIT_DEFAULT_DEPS = "1"
>
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
zhe.he@windriver.com Nov. 1, 2019, 2:01 a.m.
On 10/31/19 6:57 PM, Bruce Ashfield wrote:
> On Thu, Oct 31, 2019 at 6:20 AM <zhe.he@windriver.com> wrote:
>> From: He Zhe <zhe.he@windriver.com>
>>
>> Some package like packagegroup-core-boot may ask for package kernel. Let
>> linux-dummy rprovide package kernel to fix the following build failure.
>>
>> ERROR: Nothing RPROVIDES 'kernel' (but
>> .../meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or
>> otherwise requires it)
> Can you expand on what the higher level use case is that something is
> using packagegroup-core-boot (or whatever), but also linux-dummy ?
>
> It seems like this is going to hide misconfigurations .. since you may
> want something bootable, but yet are not properly configured.
>
> If there's part of that packagroup you need, why not split it up,
> rather than masking the symptom seen here ?

It's the "efi" in MACHINE_FEATURES who asks for "kernel".
https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/packagegroups/packagegroup-core-boot.bb#n31

I thought the user would take care of the kernel himself, so simply added it to
linux-dummy. I'm not quite sure what you mean by "split it up".

Regards,
Zhe

>
> Bruce
>
>> Signed-off-by: He Zhe <zhe.he@windriver.com>
>> ---
>>  meta/recipes-kernel/linux/linux-dummy.bb | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
>> index 62cf6f5ea6..20d7ed815d 100644
>> --- a/meta/recipes-kernel/linux/linux-dummy.bb
>> +++ b/meta/recipes-kernel/linux/linux-dummy.bb
>> @@ -8,19 +8,22 @@ LICENSE = "GPLv2"
>>  LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
>>
>>  PROVIDES += "virtual/kernel"
>> +RPROVIDES_${PN} += "kernel lib32-kernel"
>>
>>  PACKAGES_DYNAMIC += "^kernel-module-.*"
>>  PACKAGES_DYNAMIC += "^kernel-image-.*"
>>  PACKAGES_DYNAMIC += "^kernel-firmware-.*"
>>
>> -PACKAGES += "kernel-modules kernel-vmlinux"
>> +PACKAGES += "kernel-modules kernel-vmlinux kernel"
>>  FILES_kernel-modules = ""
>>  ALLOW_EMPTY_kernel-modules = "1"
>>  DESCRIPTION_kernel-modules = "Kernel modules meta package"
>>  FILES_kernel-vmlinux = ""
>>  ALLOW_EMPTY_kernel-vmlinux = "1"
>>  DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
>> -
>> +FILES_kernel = ""
>> +ALLOW_EMPTY_kernel = "1"
>> +DESCRIPTION_kernel = "Kernel meta package"
>>
>>  INHIBIT_DEFAULT_DEPS = "1"
>>
>> --
>> 2.17.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
Bruce Ashfield Nov. 1, 2019, 10:10 a.m.
On Thu, Oct 31, 2019 at 10:01 PM He Zhe <zhe.he@windriver.com> wrote:
>
>
>
> On 10/31/19 6:57 PM, Bruce Ashfield wrote:
> > On Thu, Oct 31, 2019 at 6:20 AM <zhe.he@windriver.com> wrote:
> >> From: He Zhe <zhe.he@windriver.com>
> >>
> >> Some package like packagegroup-core-boot may ask for package kernel. Let
> >> linux-dummy rprovide package kernel to fix the following build failure.
> >>
> >> ERROR: Nothing RPROVIDES 'kernel' (but
> >> .../meta/recipes-core/packagegroups/packagegroup-core-boot.bb RDEPENDS on or
> >> otherwise requires it)
> > Can you expand on what the higher level use case is that something is
> > using packagegroup-core-boot (or whatever), but also linux-dummy ?
> >
> > It seems like this is going to hide misconfigurations .. since you may
> > want something bootable, but yet are not properly configured.
> >
> > If there's part of that packagroup you need, why not split it up,
> > rather than masking the symptom seen here ?
>
> It's the "efi" in MACHINE_FEATURES who asks for "kernel".
> https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/packagegroups/packagegroup-core-boot.bb#n31
>

Right. But the question is, why is the image that is being built
trying to install packagegroup-core boot when it has linux-dummy as
the kernel ? It's basically a misconfiguration, and I'm trying to
understand the details.

If this was provided by linux-dummy, I'd think that we'd at least want
a bbwarning to let the user know that they've asked for something
bootable, but will not end up with something that can boot.

> I thought the user would take care of the kernel himself, so simply added it to
> linux-dummy. I'm not quite sure what you mean by "split it up".

Meaning, make that part of the packagegroup into a new/separate
packagegroup that could be conditionally included by a variable (and
that way the configuration you are talking about could still depend on
packagegroup-core-boot, and not get the kernel dependency ... hence no
need for linux-dummy to provide it at all). Or alternately, just have
that entry in the package group be a variable, that another layer can
bbappend and clear (and again, remove the dependency).

i.e. if this (packagroup-core-boot) is being pulled in by something
like a container image build, there are already variables that control
the kernel dependency and other ways to avoid it.

Bruce

>
> Regards,
> Zhe
>
> >
> > Bruce
> >
> >> Signed-off-by: He Zhe <zhe.he@windriver.com>
> >> ---
> >>  meta/recipes-kernel/linux/linux-dummy.bb | 7 +++++--
> >>  1 file changed, 5 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
> >> index 62cf6f5ea6..20d7ed815d 100644
> >> --- a/meta/recipes-kernel/linux/linux-dummy.bb
> >> +++ b/meta/recipes-kernel/linux/linux-dummy.bb
> >> @@ -8,19 +8,22 @@ LICENSE = "GPLv2"
> >>  LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
> >>
> >>  PROVIDES += "virtual/kernel"
> >> +RPROVIDES_${PN} += "kernel lib32-kernel"
> >>
> >>  PACKAGES_DYNAMIC += "^kernel-module-.*"
> >>  PACKAGES_DYNAMIC += "^kernel-image-.*"
> >>  PACKAGES_DYNAMIC += "^kernel-firmware-.*"
> >>
> >> -PACKAGES += "kernel-modules kernel-vmlinux"
> >> +PACKAGES += "kernel-modules kernel-vmlinux kernel"
> >>  FILES_kernel-modules = ""
> >>  ALLOW_EMPTY_kernel-modules = "1"
> >>  DESCRIPTION_kernel-modules = "Kernel modules meta package"
> >>  FILES_kernel-vmlinux = ""
> >>  ALLOW_EMPTY_kernel-vmlinux = "1"
> >>  DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
> >> -
> >> +FILES_kernel = ""
> >> +ALLOW_EMPTY_kernel = "1"
> >> +DESCRIPTION_kernel = "Kernel meta package"
> >>
> >>  INHIBIT_DEFAULT_DEPS = "1"
> >>
> >> --
> >> 2.17.1
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >
> >
>
Ross Burton Nov. 4, 2019, 1:32 p.m.
On 01/11/2019 02:01, He Zhe wrote:
> It's the "efi" in MACHINE_FEATURES who asks for "kernel".
> https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/packagegroups/packagegroup-core-boot.bb#n31

I'd just rip out 'kernel' from that as that doesn't look right to me.

Ross
zhe.he@windriver.com Nov. 5, 2019, 9:19 a.m.
On 11/4/19 9:32 PM, Ross Burton wrote:
> On 01/11/2019 02:01, He Zhe wrote:
>> It's the "efi" in MACHINE_FEATURES who asks for "kernel".
>> https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/packagegroups/packagegroup-core-boot.bb#n31
>
> I'd just rip out 'kernel' from that as that doesn't look right to me.

Not sure if the following patch is still the case.
http://lists.openembedded.org/pipermail/openembedded-core/2018-February/266287.html

Thanks,
Zhe

>
> Ross
>