Subject: Re: Accurately determining PKGNAME in mk.conf
To: None <tech-pkg@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-pkg
Date: 07/31/2007 16:52:53
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?

Joerg