kernel-module-split: rrecommend kernel-image instead of rdepend
PATCH 1/1 kernel-module-split: rrecommend kernel-image instead of rdepend
Hard depending on the kernel makes it impossible to install kernel modules without getting the kernel image installed too. This is inconvenient in e.g. initramdisks, where the kernel is loaded from outside the initramdisk.
Making the kernel modules rrecommend kernel-image-<version> instead of rdepending on it, makes it possible to install kernel modules without the kernel image by setting "kernel-image" in BAD_RECOMMENDATIONS.
--- meta/classes/kernel-module-split.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel-module-split.bbclass +6 -1
@@ -120,6 +120,11 @@ python split_kernel_module_packages () { rdepends[dep] = [] d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) + # let kernel modules runtime recommend kernel image + rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") + rrecommends['kernel-image'] = [] + d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False)) + # Avoid automatic -dev recommendations for modules ending with -dev. d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
@@ -138,7 +143,7 @@ python split_kernel_module_packages () { postinst = d.getVar('pkg_postinst_modules') postrm = d.getVar('pkg_postrm_modules') - modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION"))) + modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='') if modules: metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
Signature · 1 line
2.14.1
✗ patchtest: failure for kernel-module-split: rrecommend kernel-image instead of rdepend
== Series Details ==
Series: kernel-module-split: rrecommend kernel-image instead of rdepend
Revision: 1
URL : https://patchwork.openembedded.org/series/8386/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 5c9ef0734d)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
PATCH v2 1/1 kernel-module-split: rrecommend kernel-image instead of rdepend
In reply to Martin HundebøllHard depending on the kernel makes it impossible to install kernel modules without getting the kernel image installed too. This is inconvenient in e.g. initramdisks, where the kernel is loaded from outside the initramdisk.
Making the kernel modules rrecommend kernel-image-<version> instead of rdepending on it, makes it possible to install kernel modules without the kernel image by setting "kernel-image" in BAD_RECOMMENDATIONS.
--- meta/classes/kernel-module-split.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes/kernel-module-split.bbclass +6 -1
@@ -120,6 +120,11 @@ python split_kernel_module_packages () { rdepends[dep] = [] d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) + # let kernel modules runtime recommend kernel image + rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") + rrecommends['kernel-image'] = [] + d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False)) + # Avoid automatic -dev recommendations for modules ending with -dev. d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
@@ -138,7 +143,7 @@ python split_kernel_module_packages () { postinst = d.getVar('pkg_postinst_modules') postrm = d.getVar('pkg_postrm_modules') - 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='kernel-%s' % (d.getVar("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_depends='') if modules: metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
Signature · 1 line
2.14.1
Quoted 40 lines · Martin Hundebøll
Hard depending on the kernel makes it impossible to install kernel modules without getting the kernel image installed too. This is inconvenient in e.g. initramdisks, where the kernel is loaded from outside the initramdisk.
Making the kernel modules rrecommend kernel-image-<version> instead of rdepending on it, makes it possible to install kernel modules without the kernel image by setting "kernel-image" in
BAD_RECOMMENDATIONS.Signed-off-by Martin Hundebøll <[email protected]>--- meta/classes/kernel-module-split.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)meta/classes/kernel-module-split.bbclass +6
-2@@ -120,6 +120,11 @@ python split_kernel_module_packages () { rdepends[dep] = [] d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) + # let kernel modules runtime recommend kernel image + rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") + rrecommends['kernel-image'] = [] + d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False)) + # Avoid automatic -dev recommendations for modules ending with -dev. d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)@@ -138,7 +143,7 @@ python split_kernel_module_packages () { postinst = d.getVar('pkg_postinst_modules') postrm = d.getVar('pkg_postrm_modules') - 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='kernel-%s' % (d.getVar("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_depends='') if modules: metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules)) --
Quoted 2 lines
2.14.1
This breaks the method described in the kernel dev FAQ to omit the kernel image from the rootfs which is to set the following in a conf file:
RDEPENDS_kernel-base = ""
See http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
By recommending kernel-image directly instead of recommending the top-level kernel-<version> package which was actually removed from extra_depends, we skip the inclusion of the kernel-base package. I'm not familiar enough with the details of kernel module loading to know if the 2 files in kernel-base (modules.builtin and modules.order) are strictly needed but I think they should at least be included in via recommendation.
As we already have a documented way to omit the kernel image, can we revert this?
As an alternative I can send in a patch which changes the recommend to the top-level kernel-<version> package instead of kernel-image.
Signature · 2 lines
Paul Barker Togán Labs Ltd
Quoted 17 lines · Paul Barker
This breaks the method described in the kernel dev FAQ to omit the kernel image from the rootfs which is to set the following in a conf file:
RDEPENDS_kernel-base = ""
See http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
By recommending kernel-image directly instead of recommending the top-level kernel-<version> package which was actually removed from
extra_depends, we skip the inclusion of the kernel-base package. I'm not familiar enough with the details of kernel module loading to know if the 2 files in kernel-base (modules.builtin and modules.order) are strictly needed but I think they should at least be included in via recommendation.
Quoted 2 lines
As we already have a documented way to omit the kernel image, can we revert this?
I think reverting would be preferred. I have multiple machine configs etc which rely on the existing approach.
Quoted 11 lines
As an alternative I can send in a patch which changes the recommend to the top-level kernel-<version> package instead of kernel-image.
--
Paul Barker
Togán Labs Ltd
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 60 lines · Paul Barker
Quoted 40 lines · Martin Hundebøll
Hard depending on the kernel makes it impossible to install kernel modules without getting the kernel image installed too. This is inconvenient in e.g. initramdisks, where the kernel is loaded from outside the initramdisk.
Making the kernel modules rrecommend kernel-image-<version> instead of rdepending on it, makes it possible to install kernel modules without the kernel image by setting "kernel-image" in
BAD_RECOMMENDATIONS.Signed-off-by Martin Hundebøll <[email protected]>--- meta/classes/kernel-module-split.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)meta/classes/kernel-module-split.bbclass +6
-2@@ -120,6 +120,11 @@ python split_kernel_module_packages () { rdepends[dep] = [] d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) + # let kernel modules runtime recommend kernel image + rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") + rrecommends['kernel-image'] = [] + d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False)) + # Avoid automatic -dev recommendations for modules ending with -dev. d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)@@ -138,7 +143,7 @@ python split_kernel_module_packages () { postinst = d.getVar('pkg_postinst_modules') postrm = d.getVar('pkg_postrm_modules') - 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='kernel-%s' % (d.getVar("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_depends='') if modules: metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules)) --Quoted 2 lines
2.14.1
This breaks the method described in the kernel dev FAQ to omit the kernel image from the rootfs which is to set the following in a conf file:
RDEPENDS_kernel-base = ""
See http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
By recommending kernel-image directly instead of recommending the top-level kernel-<version> package which was actually removed from
extra_depends, we skip the inclusion of the kernel-base package. I'm not familiar enough with the details of kernel module loading to know if the 2 files in kernel-base (modules.builtin and modules.order) are strictly needed but I think they should at least be included in via recommendation.
Quoted 5 lines
As we already have a documented way to omit the kernel image, can we revert this?
As an alternative I can send in a patch which changes the recommend to the top-level kernel-<version> package instead of kernel-image.
FWIW, this was discussed at #yocto on IRC today. When I first saw the change several days ago, I was puzzled as well...
The existing method has been in use by many of us for a very long time and seems to be well documented - I also vote for reverting the change.
Signature · 1 line
Denys
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 29 lines · Martin Hundebøll
Quoted 26 lines · Denys Dmytriyenko
Quoted 8 lines · Paul Barker
This breaks the method described in the kernel dev FAQ to omit the kernel image from the rootfs which is to set the following in a conf file:
RDEPENDS_kernel-base = ""
See
http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
Quoted 9 lines
By recommending kernel-image directly instead of recommending the top-level kernel-<version> package which was actually removed from
extra_depends, we skip the inclusion of the kernel-base package. I'm not familiar enough with the details of kernel module loading to know if the 2 files in kernel-base (modules.builtin and modules.order) are strictly needed but I think they should at least be included in via recommendation.Quoted 4 lines
As we already have a documented way to omit the kernel image, can we revert this?
As an alternative I can send in a patch which changes the recommend
to
Quoted 1 line
the top-level kernel-<version> package instead of kernel-image.
Quoted 9 lines
Quoted 6 lines
FWIW, this was discussed at #yocto on IRC today. When I first saw the change
several days ago, I was puzzled as well...
The existing method has been in use by many of us for a very long time and
seems to be well documented - I also vote for reverting the change.Does setting
RDEPENDS_kernel-base = ""in an image recipe work too?
No, you'd need it to be set in a conf file so it takes effect when the kernel-base package is created.
I can see the issue here though. Can you set RDEPENDS_kernel-base = "" globally and explicitly install kernel-image into the appropriate image? If not then yes we'll need to find an alternative solution to simply reverting the change.
Signature · 2 lines
Paul Barker Togán Labs Ltd
Quoted 41 lines · Paul Barker
Quoted 29 lines · Martin Hundebøll
Quoted 26 lines · Denys Dmytriyenko
Quoted 8 lines · Paul Barker
This breaks the method described in the kernel dev FAQ to omit the kernel image from the rootfs which is to set the following in a conf file:
RDEPENDS_kernel-base = ""
See
http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
Quoted 9 lines
By recommending kernel-image directly instead of recommending the top-level kernel-<version> package which was actually removed from
extra_depends, we skip the inclusion of the kernel-base package. I'm not familiar enough with the details of kernel module loading to know if the 2 files in kernel-base (modules.builtin and modules.order) are strictly needed but I think they should at least be included in via recommendation.Quoted 4 lines
As we already have a documented way to omit the kernel image, can we revert this?
As an alternative I can send in a patch which changes the recommend
to
Quoted 1 line
the top-level kernel-<version> package instead of kernel-image.
Quoted 9 lines
Quoted 6 lines
FWIW, this was discussed at #yocto on IRC today. When I first saw the change
several days ago, I was puzzled as well...
The existing method has been in use by many of us for a very long time and
seems to be well documented - I also vote for reverting the change.Does setting
RDEPENDS_kernel-base = ""in an image recipe work too?
Quoted 8 lines
No, you'd need it to be set in a conf file so it takes effect when the kernel-base package is created.
I can see the issue here though. Can you set
RDEPENDS_kernel-base = ""globally and explicitly install kernel-image into the appropriate image? If not then yes we'll need to find an alternative solution to simply reverting the change.
Seems like the inverted approach of disabling install of kernel-image globally, and enabling it per-image works just fine.
Reverting the patch is fine by me - sorry for the noise.
// Martin
Quoted 19 lines · Martin Hundebøll
Quoted 9 lines · Paul Barker
Quoted 2 lines · Martin Hundebøll
No, you'd need it to be set in a conf file so it takes effect when the
kernel-base package is created.Quoted 8 lines
I can see the issue here though. Can you set `RDEPENDS_kernel-base =
""` globally and explicitly install kernel-image into the appropriate
image? If not then yes we'll need to find an alternative solution to
simply reverting the change.
Quoted 5 lines
Seems like the inverted approach of disabling install of kernel- image
globally, and enabling it per-image works just fine.Reverting the patch is fine by me - sorry for the noise.
Are you sure? I can't imagine being able to influence this at all from an image recipe, either the dependency is present or its not and it would be set from the global configuration, not from an image recipe...
Cheers,
Richard
Quoted 24 lines · Richard Purdie
Quoted 23 lines · Martin Hundebøll
Quoted 9 lines · Paul Barker
Quoted 2 lines · Martin Hundebøll
No, you'd need it to be set in a conf file so it takes effect when the
kernel-base package is created.Quoted 8 lines
I can see the issue here though. Can you set `RDEPENDS_kernel-base =
""` globally and explicitly install kernel-image into the appropriate
image? If not then yes we'll need to find an alternative solution to
simply reverting the change.Seems like the inverted approach of disabling install of kernel- image
globally, and enabling it per-image works just fine.
Quoted 5 lines
Quoted 1 line
Reverting the patch is fine by me - sorry for the noise.
Are you sure? I can't imagine being able to influence this at all from an image recipe, either the dependency is present or its not and it would be set from the global configuration, not from an image recipe...
Pretty sure, yes.
conf/distro/basic.conf:
RDEPENDS_kernel-base = ""
recipes-filesystems/rootfs.bb:IMAGE_INSTALL += "kernel-image kernel-module-foo"
recipes-filesystems/rescuefs.bb:IMAGE_INSTALL += "kernel-module-foo"
// Martin
Quoted 13 lines · Martin Hundebøll
Quoted 9 lines · Richard Purdie
Quoted 2 lines · Martin Hundebøll
Reverting the patch is fine by me - sorry for the noise.Are you sure? I can't imagine being able to influence this at all from
an image recipe, either the dependency is present or its not and it would be set from the global configuration, not from an image recipe...Pretty sure, yes.
Quoted 8 lines
conf/distro/basic.conf:
RDEPENDS_kernel-base = ""recipes-filesystems/rootfs.bb:
IMAGE_INSTALL+= "kernel-image kernel-module-foo"recipes-filesystems/rescuefs.bb:
IMAGE_INSTALL+= "kernel-module-foo"
Now I understand, I thought you meant adding in the RRECOMMENDS from an image recipe.
Thanks,
Richard