vifino/vifino-overlay

app-misc/openrazer: Get kernel from « /usr/src/linux » instead of « uname -r »

JulienDlq opened this issue · 7 comments

The issue here is that if a new kernel pop from portage tree, you have to compile it, boot on it, before emerge openrazer.

Instead, it could be better to get version of last compiled kernel from /usr/src/linux symlink.
As x11-drivers/nvidia-drivers do or any other package that check existence of a valid /usr/src/linux/.config file and then compile against the kernel corresponding to /usr/src/linux symlink.

Something like this:

basename $( readlink -f /usr/src/linux ) | sed 's/linux-//'
5.4.13-gentoo

Instead of:

uname -r
5.4.12-gentoo

Here are the occurrence of « uname -r »:

pwd
/var/tmp/portage/app-misc/openrazer-9999/work/openrazer-9999

grep -irl 'uname -r'                                      
scripts/ci/install-driver-deps.sh
debian/openrazer-driver-dkms.README.Debian
debian/changelog
Makefile

Mmmh not so sure, this script seems to be related to Debian/Ubuntu distros.
Maybe, a Gentoo distro specific section in upstream openrazer could be a solution?

Which still is an issue for openrazer, not for the ebuild maintainer afaik.

The ebuild uses the Debian version btw.

But nonetheless, try this one #31, maybe it does the trick

Nevermind, doesn't work ....

That's strange that it uses Debian version, since it is compiled from sources, or sources are the same for Debian and other distributions, maybe?
I don't know.

Anyway, I also tried to patch only Makefile.
It seems to work for compilation this time! But, in the end, the installation is performed in /lib/modules/(uname -r) version of Kernel, not the one from symlink /usr/src/linux. So… it does not work as expected! 😢

Hey.
As of 0895a47, this should be fixed as well.
Closing, reopen if it's still broken!