Subject: random comments from a pkg_comp newbie
To: None <>
From: Greg Troxel <>
List: tech-pkg
Date: 07/08/2004 14:30:43
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

* 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.

* 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?

* 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.

This led me to other thoughts:

* It would be nice to have an option to list all packages which don't
  have binary packages in 'packages-comp' (pkg_comp package target
  dir).  Like -l, but list all.

* It would be nice to have an option (probably in pkg_chk) to
  pkg_tarup binary packages for all packages that are installed but
  don't have binary packages present.  Perhaps this is like -l, but
  with recovery rather than just complaints.

* Perhaps pkg_chk could have an option to do binary updates with
  'pkg_add -u' to get around the dependency issues.  But perhaps this
  is too dangerous.

I don't mean to sound complaining - I'm finding pkg_comp and pkg_chk
very useful.  Thanks jmmv, abs and seb, and I'm sure others.