diff options
author | Martin Hundebøll <mnhu@prevas.dk> | 2017-08-21 11:21:34 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 08:47:02 +0100 |
commit | e0ed52c51464855e9a6a37ea49df7efde7e91076 (patch) | |
tree | 1a4c14c3b076ca60f9d21a84fb4b2c38c7f03916 | |
parent | 9086b525dd00f482ea68a384540cd30778413c9e (diff) | |
download | poky-e0ed52c51464855e9a6a37ea49df7efde7e91076.tar.gz |
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.
(From OE-Core rev: 5dd7ddb66a6846d9bb59dc7833e8318992d0e645)
Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel-module-split.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index 1035525dac..78843c5474 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass | |||
@@ -120,6 +120,11 @@ python split_kernel_module_packages () { | |||
120 | rdepends[dep] = [] | 120 | rdepends[dep] = [] |
121 | d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) | 121 | d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) |
122 | 122 | ||
123 | # let kernel modules runtime recommend kernel image | ||
124 | rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") | ||
125 | rrecommends['kernel-image'] = [] | ||
126 | d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False)) | ||
127 | |||
123 | # Avoid automatic -dev recommendations for modules ending with -dev. | 128 | # Avoid automatic -dev recommendations for modules ending with -dev. |
124 | d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1) | 129 | d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1) |
125 | 130 | ||
@@ -138,7 +143,7 @@ python split_kernel_module_packages () { | |||
138 | postinst = d.getVar('pkg_postinst_modules') | 143 | postinst = d.getVar('pkg_postinst_modules') |
139 | postrm = d.getVar('pkg_postrm_modules') | 144 | postrm = d.getVar('pkg_postrm_modules') |
140 | 145 | ||
141 | 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"))) | 146 | 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='') |
142 | if modules: | 147 | if modules: |
143 | metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') | 148 | metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE') |
144 | d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules)) | 149 | d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules)) |