Subject: Re: Newbie Questions
To: Richard Rauch <>
From: Alistair Crooks <>
List: netbsd-users
Date: 01/28/2002 10:37:36
On Mon, Jan 28, 2002 at 01:20:56AM -0600, Richard Rauch wrote:
> > > > > (a) pkgsrc has a configuration file.  I think that it now comes up under
> > > > > the name /usr/pkgsrc/mk/; to be found by the pkgsrc
>  [...]
> > > > I don't know if I'd copy the whole file over. Usually I just use
>  [...]
> > > Is there any reason not to?  It does make it easier to see what your
> > > options are.  (Just browse the file and edit it to suit your needs.)
> >
> > We used to have a file, mk.conf.example, which was used in the same
> > way you describe - copy it to /etc/mk.conf, and edit in place. Over
> > time, new options get added to the defaults, others get taken away,
> > others still get changed. And merging this into your (old) version
> ...which makes a pretty good argument for just copying over the new one
> and editing it, if you have much by way of personal preferences at
> variance with the defaults.  (^&  Trying to figure out what *new* options
> have been added seems like a chore.  (Unless there's some guarantee that
> the order of options will never change so that you can sanely diff the new
> defaults against the old.  Even then, you have to remember to make a copy
> somewhere before you delete the old defaults file.  And, if the meaning of
> options ever changes, you have more trouble trying to merge stuff in.)

The trouble with the old approach is that default values can change,
and because you're running an old version of the config file (without
definition), then things can happen in mysterious ways.
> Practice shows me that it's undesirable to update pkgsrc on a regular
> basis.  After the Nth time of rebuilding libpng, and hence reinstalling
> all and sundry, because some obscure package *really* thinks that it needs
> the latest and greatest libpng, I stopped updating pkgsrc.  Assuming
> infrequent updates of pkgsrc, I still maintain that it's easiest to copy
> the file to /etc/, then browse it and make changes.

I think we all agree that the last libpng update was not done very
well, and I apologise to everyone for that.

However, with the new, you're free to do copy
it to /etc/mk.conf and modify it there.  It won't hurt that you're
including the file twice, and anything in /etc/mk.conf is defined
before is included, and so will override the
defaults. So you haven't lost out with the new usage. In addition,
other users now have all the defaults set properly for them, unless
they decide to override them. I count this as a major win.
> I actually assumed that the renaming of the file was in order to better
> support mutiple OS alternatives.  It never occured to me that it reflected
> a change of usage by some people.

The multiple-OS support is accomplished in the defs.${OPSYS}.mk files,
along with generic definitions which are used in