bugGnash - The GNU Flash player - Bugs: bug #19826, configure prints warning...

 
 

bug #19826: configure prints warning "./configure: line 15826: printf: 0.3.0: invalid number" due to bad ming version checking

Submitted by:  Andrew Guertin <dolphinling>
Submitted on:  Tue 08 May 2007 05:54:30 PM UTC  
 
Category: buildSeverity: 1 - Wish
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 09 May 2007 02:30:56 PM UTC, comment #4:

Committed, can we close this now ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 09 May 2007 12:40:15 AM UTC, comment #3:

A sed tutorial pointed me to what I think is a better patch.

sed -n prints no lines unless it matches a pattern that ends with /p, so sed -ne 's/.beta\([[0-9]]\).*/\1/p' prints nothing unless there's a beta in the version. (And printf expands the empty string to 00 without complaining.)

Patch attached.

(file #12724)

Andrew Guertin <dolphinling>
Tue 08 May 2007 09:49:46 PM UTC, comment #2:

Please try the attached patch and let me know if it works fine.

(file #12719)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 08 May 2007 06:51:55 PM UTC, comment #1:

I think 00 is the correct value for no beta, so redirecting stderr to /dev/null should do...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 08 May 2007 05:54:30 PM UTC, original submission:

When configuring I see the warning
./configure: line 15826: printf: 0.3.0: invalid number

This comes from the following code:
MING_VERSION=`$MING_CONFIG --version`
major=`echo $MING_VERSION | sed 's/\([0-9]\)\.\([0-9]\)\.\([0-9]\)./\1/'`
minor=`echo $MING_VERSION | sed 's/\([0-9]\)\.\([0-9]\)\.\([0-9]\)./\2/'`
micro=`echo $MING_VERSION | sed 's/\([0-9]\)\.\([0-9]\)\.\([0-9]\)./\3/'`
beta=`echo $MING_VERSION | sed -e 's/.beta\([0-9]\).*/\1/'`
MING_VERSION_CODE=`printf %2.2d%2.2d%2.2d%2.2d $major $minor $micro $beta`

When using a non-beta version of ming (like 0.3.0, or presumably 0.4.0 when it is finalized) the sed script in the beta check finds nothing, and so returns the entire string.

printf %2.2d returns 00 for something that's not a number, so this probably doesn't cause any problems at all, it's just ugly seeing it there.

Andrew Guertin <dolphinling>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #12719:  ming.m4.patch added by strk (750B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by dolphinling (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 May 2007 07:11:40 AM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 09 May 2007 12:40:15 AM UTCdolphinlingAttached File-=>Added gnash_ming_configure.patch, #12724
    Tue 08 May 2007 09:49:46 PM UTCstrkAttached File-=>Added ming.m4.patch, #12719
      StatusNone=>Ready For Test
    Tue 08 May 2007 06:51:55 PM UTCstrkSeverity3 - Normal=>1 - Wish
      Assigned toNone=>strk

    Back to the top


    Powered by Savane 3.1-cleanup1