Bug 111353 - gentoo version check in libtool uses non-portable character classes
Bug#: 111353 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Other Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: goodbyte100@yahoo.com
Component: Development
URL: 
Summary: gentoo version check in libtool uses non-portable character classes
Keywords:  
Status Whiteboard: 
Opened: 2005-11-03 05:17 0000
Description:   Opened: 2005-11-03 05:17 0000
I have a cross platform project that I am testing on both a
"Linux ike 2.6.12-nitro5 #4 SMP Sat Sep 10 12:47:01 CEST 2005 i686 Intel(R)
"Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
and a
"SunOS login-9 5.8 Generic_117350-06 sun4u sparc SUNW,Ultra-5_10". I do the main
development on the linux box and every once in a while I make a package and test
it on the SunOS box. My problem is that the libtool version that is shipped with
gentoo (1.5.20) includes a "sanity check" to ensure ltmain.sh and libtool.m4
have same version number. The version number is extracted from ltmain.sh with:
grep '^[[:space:]]*VERSION=' ltmain.sh | sed -e 's|^[[:space:]]*VERSION=||'
but the sed version on the solaris box does not support [:space:] as a character
class and thus I get following error message:

*** [Gentoo] sanity check failed! ***
*** libtool.m4 and ltmain.sh have a version mismatch! ***
*** (libtool.m4 = 1.5.20, ltmain.sh = VERSION=1.5.20) ***

by instead using 
grep '^[[:space:]]*VERSION=' ltmain.sh | sed -e 's|^[ ]*VERSION=||'
the problem is solved.

------- Comment #1 From SpanKY 2005-11-03 05:45:21 0000 -------
i dont think we can use any character classes, be it with grep or sed

if we just rewrite it and put in the space/tab ourselves it should be
fine i think

------- Comment #2 From SpanKY 2005-11-03 18:33:26 0000 -------
fixed in 1.5.20-r1, thanks for reporting :)