To: avon barksdale <>
From: Alistair Crooks <>
List: tech-pkg
Date: 10/28/2002 11:45:48
On Wed, Oct 23, 2002 at 08:00:40PM -0500, avon barksdale wrote:
> On Wed, Oct 23, 2002 at 03:41:13PM -0700, Johnny C. Lam wrote:
> > I'm not sure that's it's really unneeded complexity.  We sometimes need
> > to differentiate between different releases of NetBSD in pkgsrc, and
> > extending pkgsrc to differentiate between different operating systems is,
> > I think, a small step.  While it's true that pkgsrc on Solaris, Linux, or
> > MacOS X is not as well-tested as on NetBSD, I think that the number of
> > users using pkgsrc on non-NetBSD OSes is growing, and it will eventually
> > cause the quality of pkgsrc to grow.
> Well I see commits with the message "make this work on solaris".  I
> don't see how the quality will ever grow if you're just dirtying the
> mk with extra defines for the various features of the different
> operating systems.  I suppose it's nifty if you use it, which I don't,
> so I'll shut up about it now.

The main file with all the targets and other definitions in it,
pkgsrc/mk/ has been moved over to have no OS-dependent
definitions in it.  All of its features are driven by settings defined
in the individual OS-dependent defs files, pkgsrc/mk/defs.${OPSYS}.mk.

This gives us a clean interface for the pkgsrc functionality. 
Individual packages sometimes need to do things dependent upon the
Operating System, and they include pkgsrc/mk/ (which also
includes pkgsrc/mk/,, /etc/mk.conf and
other files to get default settings), and then decide what to do
dependent upon OS. If any of these get to be generic over the whole
of pkgsrc, then we'll look at making them into a generic definition.

My PoV is that this gives us a nice, scalable way of doing
multi-platform and multi-operating system packaging, and that it's
well worth having.  If you only use pkgsrc for NetBSD, I'm not sure
you'd notice anything.  If you use it on Solaris, as I did for a
while, or a different operating system, I think it becomes rapidly
obvious how useful it is to have pkgsrc running on it.