[Dev] [RFC] Linux kernel ABI versioning

Luke Shumaker lukeshu at lukeshu.com
Wed Mar 22 16:07:23 GMT 2017


I'd like to propose adding a LINUX-ABI_VERSION pseudo-package that is
provided by each of the Linux kernel packages.

So then a package that requires at least Linux kernel 4.7 (until
recently, -lts was 4.4), can say

    requires=('LINUX-ABI_VERSION>=4.7')
    conflicts=('LINUX-ABI_VERSION<4.7')

without having to worry about if the user uses linux-libre or
linux-libre-lts or linux-libre-knock-lts or whatever.  The "conflicts"
line is important because it handles the case where the user has both
linux-libre and linux-libre-lts installed, but boots to -lts by
default; thus breaking the dependency on the newer kernel.

This can be accomplished by adding "LINUX-ABI_VERSION=${_pkgver%%-*}"
to the provides=() line in the "_package()" function.

-- 
Happy hacking,
~ Luke Shumaker



More information about the Dev mailing list