bugGNU gettext - Bugs: bug #45048, Variable check in po.m4 should be...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45048: Variable check in po.m4 should be improved to clarify intent

Submitted by:  None
Submitted on:  Thu 07 May 2015 07:58:59 PM UTC  
 
Category: Programmer toolsSeverity: 3 - Normal
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Fri 08 May 2015 01:13:39 AM UTC, comment #1:

It is on purpose that we distinguish the case where LINGUAS is unset from the case where LINGUAS is empty. If the former, po.m4 reads po/LINGUAS file and determine the list of .po files to process. If the latter, po.m4 doesn't process any .po file.

So, the use of LINGUAS in p11-kit looks fair, if they want to prevent unnecessary .po file update on "make dist" etc. If it doesn't work, reopen the bug with a complete error log.

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Thu 07 May 2015 07:58:59 PM UTC, original submission:

The test of LINGUAS in po.m4 (code that is transferred to configure/config.status) appears to allow for errors:

LINGUAS="${LINGUAS-%UNSET%}"

This check can have 3 outcomes, but I don't think that is the intent. From what I can determine, the value of LINGUAS after this statement is supposed to be either (1) what was LINGUAS before, or (2) the value "%UNSET%". But the above code allows for a resulting value of null if the variable was set but empty.

In the p11-kit (0.23.1) this problem appears, and current levels of the build tools expose a failure when trying to build the language support files. The p11-kit code erroneously sets LINGUAS='' in its configure.ac, which causes a problem here. Right or wrong, this check can accommodate this mistake with a small change.

The correct syntax should be:

LINGUAS="${LINGUAS:-%UNSET%}"

(Note the colon before the hyphen) which will ensure that the result is either the previous value or %UNSET%. Subsequent checks for %UNSET% will therefore succeed, and the variable will never be null (empty) after this point.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by ueno (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:02:33 PM UTChaibleCategoryNone=>Programmer tools
      Assigned toNone=>ueno
    Fri 08 May 2015 01:13:39 AM UTCuenoStatusNone=>Not a Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1