Kernel version for Kernel Module Packages

I’m working on a package which contains several kernel modules. While OBS builds the packages without errors, it seems to be building against an older kernel version. This in turn makes YaST try to downgrade the kernel on my test machine to match the version in my module package. For instance, my kmp RPM for openSUSE 13.1 x86_64 requires kernel version 3.11.6-4-desktop, yet the current desktop kernel version is 3.11.10-29-desktop.

Is there any automatic way to get OBS to build using the latest kernel version, i.e. the one that has obviously been delivered via the update mechanism? Or do I explicitly have to declare the later kernel as a dependency in the spec file?

Any pointers would be appreciated.

Patrick

Build against openSUSE:13.1:Update instead of openSUSE:13.1.
But this shouldn’t be necessary, the kernels should be compatible.

Or do I explicitly have to declare the later kernel as a dependency in the spec file?

No, you would require both then I suppose.

The nvidia kmps have this in their spec files:

%global __requires_exclude kernel-uname-r* 

But this removes the requirement on the kernel package completely.