PKGNAME for non-default settings may change

Joe Marcus Clarke marcus at marcuscom.com
Mon Dec 17 16:55:41 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Boris Samorodov wrote:
> On Mon, 17 Dec 2007 14:39:00 -0500 Joe Marcus Clarke wrote:
>> Boris Samorodov wrote:
>>> On Mon, 17 Dec 2007 01:35:01 -0500 Joe Marcus Clarke wrote:
>>>> On Sat, 2007-12-08 at 23:16 +0300, Boris Samorodov wrote:
>>>>> On Fri, 07 Dec 2007 22:56:37 -0500 Joe Marcus Clarke wrote:
>>>>>> Boris Samorodov wrote:
>>>>>>> On Fri, 07 Dec 2007 15:16:37 -0500 Joe Marcus Clarke wrote:
>>>>>>>> Boris Samorodov wrote:
>>>>>>>>> when building a package with non-default settings then a PKGNAME may
>>>>>>>>> be changed from a default one. Ex., if one builds
>>>>>>>>> editors/openoffice.org-2 with LOCALIZED_LANG="ru" then the package
>>>>>>>>> name changes (a suffix "ru-" is added). But the recorded to a database
>>>>>>>>> PKGNAME (and thus shown  at the web interface) stays a default one.
>>>>>>>> This would be the case if the build and the makefile/database generation
>>>>>>>> code are not in sync.  That should not be the case.
>>>>>>> Actually, I didn't update tinderbox, just installed it from a port
>>>>>>> and never tried to upgrade/update it. How can I verify that the build
>>>>>>> and the makefile/database generation are at sync?
>>>>>> Run ./tc addPort on your port with your custom settings defined, and
>>>>>> check the database.  If the PKGNAME is not correct, then that needs to
>>>>>> be looked at.
>>>>> Joe, thanks for your suggestion.
>>>>>
>>>>> Seems that I found the culprit. The package name is defined at
>>>>> makemake (line 194):
>>>>> -----
>>>>> $pkgname = $makecache->PkgName($portdir);     [1]
>>>>> -----
>>>>>
>>>>> Looking at it deeper I found that the value is defined at finction
>>>>> _execMake file lib/MakeCache.pm (line 58). Apparently this function
>>>>> doesn't trace custom variables from *.env.
>>>>>
>>>>> If I manually assign the needed name to $pkgname at [1]
>>>>> (i.e. $pkgname = 'ru-openoffice.org-2.0.1') then everything go fine:
>>>>> the Makefile at $tb/builds/$build, the log name (URL), the package
>>>>> file (URL) point to the right files and the column 'Version' at web
>>>>> pages contains the right version (i.e. with 'ru-' prefix).
>>>> I've gone through the code, and the Perl buildenv() function (called
>>>> from makemake) DOES read the .env files in (or it should).  What do
>>>> your .env files look like?
>>>> I'm getting ready to do another bug fix 2.x release, but I'd like to get
>>>> this problem sorted first.
>>> Joe, thanks for looking at the case. Right now I don't have much time
>>> but I hope I'll have it at the evening.
>>>
>>> The .env file is as simple as:
>>> -----
>>> % cat portstrees/bsam/portstree.env 
>>> if [ ${DIRNAME}="*/editors/openoffice.org-2" ]; then
>>> export LOCALIZED_LANG="ru"
>>> fi
>>> % 
>>> -----
> 
>> Interesting, I don't think I made the Perl code understand anything
>> other than lines starting with "export".  I'll play with this.  In the
> 
> Yep, as I see from the output, only "export" lines are taken into
> consideration. ;-)
> 
>> meantime, if you could add the following code to makemake after the
>> buildenv call, then send me the build output, that would help:
> 
>> foreach my $env (keys %ENV) {
>> print "$env --> $ENV{$env}\n";
>> }
> 
> Here is the output for that portstree:

I found the bug.  It was in my Perl environment code.  I will commit a fix.

Joe


> -----
> 
> 
> ------------------------------------------------------------------------
> 
> -----
> 
> 
> WBR


- --
PGP Key : http://www.marcuscom.com/pgp.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHZvBcb2iPiv4Uz4cRAjDXAJ0aWKvzSjUez3lN0aUB7pCijyzSnwCfS6vM
QEH8HBrm5TsA/Tnkb4O+7t0=
=3Vw3
-----END PGP SIGNATURE-----


More information about the tinderbox-list mailing list