From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 2/3] kernel-module-split.bbclass: generate dependencies across recipes
Date: Thu, 18 Aug 2016 08:56:25 +0100 [thread overview]
Message-ID: <20160818075626.15973-3-git@andred.net> (raw)
In-Reply-To: <20160818075626.15973-1-git@andred.net>
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@andred.net>
---
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))
--
2.9.3
next prev parent reply other threads:[~2016-08-18 7:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 15:25 [PATCH 0/2] fixing kernel module cross-recipe dependency André Draszik
2016-08-17 15:25 ` [PATCH 1/2] module.bbclass: use Module.symvers for dependants André Draszik
2016-08-17 15:25 ` [PATCH 2/2] kernel-module-split.bbclass: generate dependencies across recipes André Draszik
2016-08-17 16:12 ` [PATCH] kernel-module-split.bbclass: no need for running depmod André Draszik
2016-08-18 7:56 ` [PATCH v2 0/3] fixing kernel module cross-recipe dependency André Draszik
2016-08-18 7:56 ` [PATCH v2 1/3] module.bbclass: use Module.symvers for dependants André Draszik
2016-11-16 20:18 ` Denys Dmytriyenko
2016-11-17 10:22 ` André Draszik
2016-11-17 18:47 ` Denys Dmytriyenko
2016-08-18 7:56 ` André Draszik [this message]
2016-08-18 7:56 ` [PATCH v2 3/3] kernel-module-split.bbclass: no need for running depmod André Draszik
2016-08-26 10:38 ` [PATCH v2 0/3] fixing kernel module cross-recipe dependency André Draszik
2016-09-05 11:18 ` André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160818075626.15973-3-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox