[oe-commits] [openembedded-core] 02/69: kernel-module-split.bbclass: generate dependencies across recipes

git at git.openembedded.org git at git.openembedded.org
Thu Sep 8 07:26:19 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit e4af1fa3aee7f1cf00ca27944b10b886f41f2fda
Author: André Draszik <git at andred.net>
AuthorDate: Thu Aug 18 08:56:25 2016 +0100

    kernel-module-split.bbclass: generate dependencies across recipes
    
    The information retrieved via depmod is incomplete with
    regards to kernel modules that are dependencies, in
    particular where two kernel modules are built from
    different source trees / recipes, which leads to incomplete
    dependency information for packages created.
    
    So far, our packages created didn't contain dependencies on
    packages created by other recipes, as we solely use depmod
    for that, and depmod can only work well after *all* kernel
    modules have been copied into one place - it doesn't work
    well in a staged approach.
    
    Now that all .ko have correct dependency information at packaging
    time, we can use that information to properly track dependencies
    across recipies, and can combine the information from the
    .modinfo elf section with the information from depmod.
    
    Signed-off-by: André Draszik <git at andred.net>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel-module-split.bbclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index ed42d2b..db0ad33 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -173,7 +173,15 @@ python split_kernel_module_packages () {
             d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
 
         rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
-        for dep in get_dependencies(file, pattern, format):
+        modinfo_deps = []
+        if "depends" in vals and vals["depends"] != "":
+            for dep in vals["depends"].split(","):
+                on = legitimize_package_name(dep)
+                dependency_pkg = format % on
+                modinfo_deps.append(dependency_pkg)
+        depmod_deps = get_dependencies(file, pattern, format)
+        all_deps = list(set(modinfo_deps + depmod_deps))
+        for dep in all_deps:
             if not dep in rdepends:
                 rdepends[dep] = []
         d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list