Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 6982

Summary: id3lib 3.8.0 has less than graceful gcc check
Product: Gentoo Linux Reporter: Olav Kolbu <gentoo>
Component: New packagesAssignee: Matthew Kennedy (RETIRED) <mkennedy>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Olav Kolbu 2002-08-24 11:43:42 UTC
src_unpack() {

        unpack ${A}

        if [ "`gcc --version | cut -f1 -d.`" -eq 3 ] ||
           ([ -n "${CXX}" ] && [ "`${CXX} --version | cut -f1 -d.`" -eq 3 ]) ||
           [ "`gcc --version|grep gcc|cut -f1 -d.|cut -f3 -d\ `" -eq 3 ]
        then
                cd ${S}
                # Removed azarah's patch for _pre2 (doesn't seem to be
[...]

The final test line there will throw an error on gcc versions less than 3, since
there is no "gcc" in the "gcc --version" output, and thus the expression
resolves to [ "" -eq 3 ]


bash-2.05a# [ "`gcc --version|grep gcc|cut -f1 -d.|cut -f3 -d\ `" -eq 3 ]
[: : integer expression expected
bash-2.05a# gcc --version
2.95.3

Not that it actually matters, since the test is only supposed to succeed on v3,
but it should be done in a way that doesn't throw an error at the user.

                        OK
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2002-08-26 23:53:05 UTC
olav,

i just corrected the ebuild. there will be no new -r release for this change. to
test it, just emerge rsync and emerge id3lib. it should appear on the rsync
mirrors after about 45 minutes from now.

let me know if there are any problems, and thanks for the bug report!

matt