Tuesday, March 03, 2009

HAL: new keys to match kernel version

Since a while there is the problem that e.g. suspend quirks or key mappings differ between kernel versions. While machines with newer kernel versions may need no longer to map scancodes (as in case of ThinkPads) or need no special suspend handling anymore, systems with older kernels may need other handling.

With current HAL versions it's not possible to match the kernel versions (e.g. > 2.6.28), except for a special version, because system.kernel.version is a string. This is especially a problem with data from the hal-info package, since the package depends on no special kernel version.

I added a patch to HAL to provide now these new comparable (using e.g. compare_*) keys:
  • system.kernel.version.major (int)
  • system.kernel.version.minor (int)
  • system.kernel.version.micro (int)
This change will be part of the upcomming 0.5.12 release. For openSUSE 11.1 you can get the latest HAL snapshot from my OSBS repo.
Tech Tags: