Subject: Re: mk/bulk/build questions
To: Jeremy C. Reed <reed@reedmedia.net>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 03/24/2005 11:45:02
On Thu, 24 Mar 2005, Jeremy C. Reed wrote:

> > Actually, if "build -s" is used and one of the *_SPECIFIC_PKGS is set, the
> > dependencies are automatically factored out into their own builds, not built
> > inline with their dependents.  There's a dependency-calculation phase which
> > does this at the beginning.
>
> Can you explain or provide an example on how to use the --specific-pkgs
> and *_SPECIFIC_PKGS?

In mk.conf, you can set any of {SITE,HOST,GROUP,USER}_SPECIFIC_PKGS that
list <category>/<pkg> separated by whitespace as packages you wish to build
(instead of "everything") when SPECIFIC_PKGS is set.  "build -s" sets the
SPECIFIC_PKGS flag, making the settings above take effect.

> In particular, how did you configure your bulk builds (for Interix) to
> only do a defined set of packages at a time?

You'll find this rather funny.  My last build had the following in mk.conf.
(At the moment I'm finally running the first Interix "full" build.)

.  if !defined(HOST_SPECIFIC_PKGS)
HOST_SPECIFIC_PKGS!=    cd /usr/pkgsrc && echo \
                                archivers/[9a-z]* \
                                chat/[a-z]* \
                                comms/[a-z]* \
                                converters/[2a-z]* \
                                editors/[Ta-z]* \
                                graphics/[3G-LN-Za-z]* graphics/CR* graphics/Me* \
                                ham/[7a-z]* \
                                math/[Ra-z]* \
                                net/[6G-LN-Za-z]* \
                                news/[a-z]* \
                                pkgtools/[a-z]* \
                                security/openssh \
                                shells/[a-z]* \
                                time/[a-z]*
.  endif

> I am looking at pkgsrc/mk/defaults/mk.conf which briefly explains, but I
> don't see _SPECIFIC_PKGS used anywhere in mk.

It's actually used only in pkgsrc/Makefile.  :)

> Since I don't (yet) the relevant code, I am not sure why there are four
> different *_SPECIFIC_PKGS and how they differ (other than my the name).
> Are the resulting packages flagged someway or placed in different places,
> for use for the SITE, HOST, GROUP, or USER?

No, these are just four variables you can use any way you want.  My guess is
that they're intended to be supplied by possibly shared (in different ways)
mk.conf fragments.

> I currently have in my pkgsrc/mk/bulk/build.conf:
> PKGLIST="`cd ~/pkgsrc && find [a-c]* -depth 1 -type d | egrep -v 'bootstrap/|/CVS|mk/'`"
>
> Should I keep PKGLIST empty?

Yes.  Don't set PKGLIST with a bulk build, as the bulk framework expects to
*create* that variable from its input.  Use *_SPECIFIC_PKGS.  I'd guess,
then, that this is the source of your problems.

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>