Patchwork kernel.bbclass: add kernel-modules to PACKAGES

login
register
mail settings
Submitter Martin Jansa
Date Oct. 16, 2012, 10:34 p.m.
Message ID <1350426868-27433-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/38191/
State Accepted
Commit caba9cbfce09f19eb27f4c6615c0c5c48e1a2952
Headers show

Comments

Martin Jansa - Oct. 16, 2012, 10:34 p.m.
* kernel-modules is always added to PACKAGES later in python code and
  needed to be defined as PACKAGES_DYNAMIC
* add it to PACKAGES directly and set
  ALLOW_EMPTY_kernel-modules
  FILES_kernel-modules
  DESCRIPTION_kernel-modules
  outside populate_packages_prepend like for other packages and set only
  RDEPENDS_kernel-modules from python code

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 7b03e29..f54b024 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -259,11 +259,12 @@  EXPORT_FUNCTIONS do_compile do_install do_configure
 
 # kernel-base becomes kernel-${KERNEL_VERSION}
 # kernel-image becomes kernel-image-${KERNEL_VERISON}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
+PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules"
 FILES = ""
 FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
 FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
 FILES_kernel-vmlinux = "/boot/vmlinux*"
+FILES_kernel-modules = ""
 RDEPENDS_kernel = "kernel-base"
 # Allow machines to override this dependency if kernel image files are 
 # not wanted in images as standard
@@ -274,6 +275,8 @@  RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
 ALLOW_EMPTY_kernel = "1"
 ALLOW_EMPTY_kernel-base = "1"
 ALLOW_EMPTY_kernel-image = "1"
+ALLOW_EMPTY_kernel-modules = "1"
+DESCRIPTION_kernel-modules = "Kernel modules meta package"
 
 pkg_postinst_kernel-image () {
 if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
@@ -457,8 +460,6 @@  python populate_packages_prepend () {
 
     import re
     metapkg = "kernel-modules"
-    d.setVar('ALLOW_EMPTY_' + metapkg, "1")
-    d.setVar('FILES_' + metapkg, "")
     blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux' ]
     for l in module_deps.values():
         for i in l:
@@ -470,9 +471,6 @@  python populate_packages_prepend () {
         if not pkg in blacklist and not pkg in metapkg_rdepends:
             metapkg_rdepends.append(pkg)
     d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
-    d.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package')
-    packages.append(metapkg)
-    d.setVar('PACKAGES', ' '.join(packages))
 }
 
 # Support checking the kernel size since some kernels need to reside in partitions