* [RESEND][PATCH] package_ipk.bbclass: add kernel version to module dependencies
@ 2016-06-03 10:01 Ovidiu-Adrian Vancea
2016-06-03 12:40 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Ovidiu-Adrian Vancea @ 2016-06-03 10:01 UTC (permalink / raw)
To: openembedded-core
From: Ovidiu Vancea <ovidiu.vancea@ni.com>
Updating the kernel ("opkg install kernel") does not update the
dependencies (i.e. modules) because there is no possibility to do version
enforcement in the OE recipe. Upon rebooting, the older version modules
do not load and can leave hardware in a non-functioning state (if their
drivers are not built into the kernel).
Use the Version field from the kernel package on its rdepends, rrecommends,
and rsuggests fields’ version. This makes the packages on which the kernel
depends to be the same version as the kernel.
Version field contains package build number (including git hash) and package
revision, thus restricting the kernel and modules to always be built together.
Signed-off-by: Ovidiu Vancea <ovidiu.vancea@ni.com>
---
meta/classes/package_ipk.bbclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 08f7020..0a07f61 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -196,6 +196,15 @@ python do_package_ipk () {
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
debian_cmp_remap(rconflicts)
+ if (pkgname == "kernel") and (localdata.getVar("VERSION_KERNEL_MODULES", False) == "1"):
+ suffix = "="+localdata.getVar('PKGV', True)+"-"+localdata.getVar('PKGR', True)
+ for key in rdepends:
+ rdepends[key] = suffix
+ for key in rsuggests:
+ rsuggests[key] = suffix
+ for key in rrecommends:
+ rrecommends[key] = suffix
+
if rdepends:
ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
if rsuggests:
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [RESEND][PATCH] package_ipk.bbclass: add kernel version to module dependencies
2016-06-03 10:01 [RESEND][PATCH] package_ipk.bbclass: add kernel version to module dependencies Ovidiu-Adrian Vancea
@ 2016-06-03 12:40 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-06-03 12:40 UTC (permalink / raw)
To: Ovidiu-Adrian Vancea, openembedded-core
On Fri, 2016-06-03 at 13:01 +0300, Ovidiu-Adrian Vancea wrote:
> From: Ovidiu Vancea <ovidiu.vancea@ni.com>
>
> Updating the kernel ("opkg install kernel") does not update the
> dependencies (i.e. modules) because there is no possibility to do
> version
> enforcement in the OE recipe. Upon rebooting, the older version
> modules
> do not load and can leave hardware in a non-functioning state (if
> their
> drivers are not built into the kernel).
>
> Use the Version field from the kernel package on its rdepends,
> rrecommends,
> and rsuggests fields’ version. This makes the packages on which the
> kernel
> depends to be the same version as the kernel.
>
> Version field contains package build number (including git hash) and
> package
> revision, thus restricting the kernel and modules to always be built
> together.
Doesn't this make the system behave differently between the different
package backends? That is something we really don't want to do.
Either all package backends have/need this dependency or none do, we
don't want different behaviours without good reason.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-03 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03 10:01 [RESEND][PATCH] package_ipk.bbclass: add kernel version to module dependencies Ovidiu-Adrian Vancea
2016-06-03 12:40 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.