[Rpm-ecosystem] Writing a dnf plugin to better deal with out of tree kernel modules

Florian Festi ffesti at redhat.com
Thu Oct 6 10:21:19 UTC 2016

On 10/06/2016 12:01 PM, Florian Festi wrote:
> I wonder if this can be done with rich dependencies. It is a bit tricky
> as you cannot have variables in them. So you cannot say:
> Conflicts: kernel without matching module_foo
> But with the assumption that new kernels have a bigger version number it
> should still work if we add to nvidia-kernel-module:
> Conflicts: (kernel-core > $VERSION and not nvidia-kernel-module > $VERSION)
> Unfortunately we did not (yet) add a "not" operator as I was not able to
> find a good use case. Here it is. So how to write this differently:
> Requires: (nvidia-kernel-module > $VERSION if kernel-core > $VERSION)
> This is kinda awkward as it requires a bigger version of itself, but ..
> meh ... it is equivalent to the line above.
> May be someone wants to try this out if it actually works.

With some more thought this approach has the disadvantage that it will
happily install

kernel-core-v+1 without nvidia-kernel-module if
kernel-core-v+2 with nvidia-kernel-modul is also or already installed.

Otoh idf the4 boot entry is updated by the newest kernel, that should be
good enough.

kernel-core-v+1 with nvidia-kernel-module and
kernel-core-v+2 without nvidia-kernel-modul

wont happen as the v+1 should force the v+2 to install the module, too.



Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill

More information about the Rpm-ecosystem mailing list