Subject: Re: random comments from a pkg_comp newbie
To: Greg Troxel <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 07/08/2004 21:19:16
On Thu, 08 Jul 2004 14:30:43 -0400
Greg Troxel <> wrote:

> I just started using pkg_comp, intending to rebuild up-to-date ones
> without risking the running config.  I have a few random comments.
> * Why is pkgtools/x11-links built automatically?  It seems this should
>   get pulled in by the first thing that needs it.  In my case, it
>   loses because my x11 sets are not right (1.6.2/current xsrc), but I
>   just pax over the xsrc destdir after building the chroot.  So really
>   this wouldn't hurt someone doing things right, but still if I try to
>   build only a package that doesn't use x, I shouldn't have this
>   built.  (Same for digest, but I see there is an issue with compiler
>   bootstrapping.)

Indeed.  I already removed several "automated installations" during the
creation of the sandbox... and this can be removed as well.

> * I used pkg_chk inside the chroot, with -s -a.  I wanted binary
>   packages, and didn't get them.  I added DEPENDS_TARGET=package to
>   mk.conf, but it seems like this should be the default somehow,
>   between pkg_chk and pkg_comp.  I fixed this by adding 
>   to my pkg_comp config file before running makeroot.  I suppose some
>   people don't want binary packages, but that seems like the special
>   case rather than the normal case for pkg_comp usage.  Even people
>   testing pkgsrc compilation would want to do that, to validate
>   PLISTs, I'd think.

Yeah, that sounds reasonable too.  But as I don't use pkg_chk... I didn't
thought about it.

> * I would like to run a batch compile with pkg_chk inside the chroot.
>   I have written a script to install pkg_chk if not present and then
>   run it with my config file, and placed the script and config file in
>   the chroot.  It would be nice to have a pkg_comp command to run a
>   script in the chroot, so I don't need to type at it (and hence can
>   put the whole thing in the background).  I realize that I could
>   perhaps use the 'build' target, but I want to let pkg_chk do the
>   work.  Am I missing some obvious way to do this, other than adding a
>   'run' target to pkg_comp?

$ pkg_comp chroot your_command

> * It would be nice for the manpage to discus the pros and cons of
>   overlaying the chroot packages dir on the real one.  I chose to make
>   a separate one, since I want to have clean pkg dir to put on a
>   custom install cd.  If the dir doesn't exist perhaps it should just
>   be created, but I realize that can cover up errors.

I always use different binary repos for each configuration.  Which are
your ideas of "pros and cons"?


Julio M. Merino Vidal <>
The NetBSD Project -