Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 342607 - sys-fs/udev-151-r4: KV_to_int broken with newer user-built kernels
Summary: sys-fs/udev-151-r4: KV_to_int broken with newer user-built kernels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 10:00 UTC by Johan Hovold
Modified: 2013-01-17 21:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix broken KV_to_int (fix_KV_to_int.patch,427 bytes, patch)
2010-10-25 10:05 UTC, Johan Hovold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Hovold 2010-10-25 10:00:49 UTC
Since 2.6.35 the kernel version string for user-built kernels may have a plus-sign-appended (e.g. 2.6.36+). This causes KV_to_int to fail (e.g. when called from check-kernel in udev-mount at boot).


Reproducible: Always

Steps to Reproduce:
1. $ source /lib/udev/shell-compat-KV.sh
2. $ KV_to_int 2.6.36+


Actual Results:  
actual output: 

bash: 2 * 65536 + 6 * 256 + 36+ : syntax error: operand expected (error token is "+ ")

Expected Results:  
expected output: 

132644

This applies to all versions of udev using shell-compat-KV.sh (i.e. 136, 147, 151-r4, 156, 161).

The kernel version string gets a plus sign appended if the kernel is built from a non-tagged head commit (see kernel commit 85a256d8e0116c8f5ad276730830f5d4d473344d for details).
Comment 1 Johan Hovold 2010-10-25 10:05:28 UTC
Created attachment 251919 [details, diff]
fix broken KV_to_int

This patch fixes KV_to_int by deleting the longest matching suffix not starting with a digit (i.e. [^0-9]*) from KV_MICRO instead of the longest matching suffix matching starting with a dot (i.e. .*).
Comment 2 Ulrich Müller gentoo-dev 2011-09-22 07:13:43 UTC
I see nothing PMS related here. Removing from CC.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 21:18:39 UTC
KV_to_int is now in /etc/init.d/udev and by the looks of it, it is fixed already for next stable >=197-r2, >=udev-init-scripts-19