Subject: Re: pkgsrc.conf
To: None <tech-pkg@NetBSD.org>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-pkg
Date: 08/17/2007 08:48:00
In article <46C4D5E2.2010401@NetBSD.org> Roland wrote:
: Dieter Baron wrote:
: > In article <46C4133A.6030409@NetBSD.org> Roland wrote:
: > : currently, the tools for managing binary packages are missing a 
: > : configuration file. I have created a first draft that addresses some of 
: > : the things I would like to see in such a configuration file. If you miss 
: > : something, please add it there.
: > 
: > :      http://wiki.netbsd.se/pkgsrc.conf
: > 
: >   Why different names from the variables used for the same purpose in
: > pkgsrc (when building from source)?  Why a different syntax?  I would
: > like to make it possible to use the same file for both pkg_add and
: > pkgsrc.  Also, we already have code to parse and manipulate
: > VARNAME=values files.

: 1. My mk.conf file does not only contain variable assignments. There are 
: also some conditionals, for loops and inclusions of other files. I 
: wouldn't like pkg_add to implement all this stuff again. What if the 
: variables contain things like ${OTHER_VARIABLE:S,foo,bar&baz,g:sh}, or, 
: more practically, ${DEFAULT_ACCEPTABLE_LICENSES:Ngnu-gpl-3.0}?

  mk.conf could contain a line like

.include "/path/to/pkg_add/config-file"

  So any fancy stuff you need for building from source is in mk.conf,
and the settings shared with pkg_add can be used by both.  You don't
have to do it that way, but if the variables are named the same and
the syntax is the same, it *can* be done easily.

: 2. I don't like upper-case letters. :)

  I don't like to have to remember two names for the same thing, and
so do a lot of new users.

: 3. Those who use only binary packages would not need a mk.conf file at 
: all. This file would be enough for their needs. And then, it does not 
: contain any settings that are irrelevant for binary-only environments.

: It is true that the user would have to duplicate the list of acceptable 
: licenses, and I don't know how to solve this in the best way. :(

  See above.

						yours,
						dillo