[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4056/8267] kernel-module-split: Append KERNEL_VERSION string to kernel module name
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4056/8267] kernel-module-split: Append KERNEL_VERSION string to kernel module name
- Date: Sun, 17 Dec 2017 01:30:03 +0000 (UTC)
commit 47400e36484b2da96d568a4d26a9cef8fb5ed592
Author: Ola Redell <ola redell retotech se>
Date: Fri Jan 13 18:22:23 2017 +0100
kernel-module-split: Append KERNEL_VERSION string to kernel module name
The KERNEL_VERSION string is added to kernel module package names in order
to make the kernel modules for different kernel versions distinct packages
instead of different versions of the same package. With this change, when
a new kernel is installed together with its kernel modules (e.g. by upgrade
of the packages kernel and kernel-modules) using some package manager such
as apt-get or rpm, the kernel modules for the older kernel will not be
removed. This enables a fall back to the older kernel if the new one fails.
Also, for backwards compatibility and to enable kernel version agnostic
dependencies to kernel modules, create a virtual package with the old
(shorter) kernel module package name using RPROVIDES.
(From OE-Core rev: 78cde87bb6e71ec5b603426879267874900d09f3)
Signed-off-by: Ola Redell <ola redell retotech se>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/kernel-module-split.bbclass | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 0e4e110..fd04b72 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -31,6 +31,7 @@ PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
KERNEL_MODULE_PACKAGE_PREFIX ?= ""
+KERNEL_MODULE_PROVIDE_VIRTUAL ?= "1"
python split_kernel_module_packages () {
import re
@@ -119,10 +120,16 @@ python split_kernel_module_packages () {
# Avoid automatic -dev recommendations for modules ending with -dev.
d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
+ # Provide virtual package without postfix
+ providevirt = d.getVar('KERNEL_MODULE_PROVIDE_VIRTUAL', True)
+ if providevirt == "1":
+ postfix = format.split('%s')[1]
+ d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, ''))
+
module_regex = '^(.*)\.k?o$'
module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
- module_pattern = module_pattern_prefix + 'kernel-module-%s'
+ module_pattern = module_pattern_prefix + 'kernel-module-%s-' + d.getVar("KERNEL_VERSION", True)
postinst = d.getVar('pkg_postinst_modules')
postrm = d.getVar('pkg_postrm_modules')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]