Subject: Re: Accurately determining PKGNAME in mk.conf
To: Joerg Sonnenberger <joerg@britannica.bec.de>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 07/31/2007 17:03:56
On 31/07/2007, at 16:52, Joerg Sonnenberger wrote:
> On Tue, Jul 31, 2007 at 02:59:53PM +0100, David Brownlee wrote:
>> Its currently not possible to add checks to mk.conf based
>> on the PKGNAME, as various packages set PKGNAME _after_
>> mk.conf has been included - such as firefox, ups-nut,
>> ap-php.
>
> Given that we want to change PKGNAME based on options, this is pretty
> hard to do. It can *never* be fully evaluated in mk.conf for that
> reason. It can be partially evaluated with the implementation I
> have in
> mind, have but not fully.
>
>> c) Have an option for mk.conf to be included a second time
>> after everything else has been evaluated, for example if
>> a variable like 'MK_CONF_POSTINCLUDE' is set in mk.conf, it
>> will be included a second time after everything else with
>> a flag to indicate it is the post include
>
> Refused. Has too much foot-shooting potential.
>
> Why can't you just use the PKGPATH (e.g. via .CURDIR) like everyone
> else
> does?
Because that is ugly? I'd much much rather have a "PKGDIR" variable
that tells me the package I'm building (x/y) than have to deduce that
from .CURDIR.
--
Julio M. Merino Vidal <jmmv84@gmail.com>