Subject: Re: syspkg dependencies
To: None <>
From: Alan Barrett <>
List: current-users
Date: 10/19/2004 17:48:48
On Tue, 19 Oct 2004, Alistair Crooks wrote:
> What's wrong with using the existing pkg_install utilities for system
> packages?  (A genuine question, I know that David has a lot more
> experience in this area than I do).

I described some of the problems (and suggested solutions)
in <>.

-- begin quote
 I sent details in private mail.  Essentially, empty directories that
 exist in the *.tgz file, and that are mentioned in @dirrm lines in
 the +CONTENTS file embedded in the tgz, are not created by pkg_add.
 Non-empty directories are created almost by accident, as a side-effect
 of creating files, with no attention being paid to their ownership or

 To fix this, I think pkg_add should parse @dirrm lines, and create each
 listed directory with the ownership and permissions described in the
 ustar headers in the *.tgz file.  Alternatively, we could pass "@option
 extract-in-place" to pkg_add, in which case the tar process should
 just DTRT with empty directories that exist in the *.tgz file.  As yet
 another alternative, I suppose we could decree that pkg_add's existing
 behaviour is correct, but pkg_create needs to put lines like "@exec
 mkdir foo ; chown user:group foo ; chmod 666 foo" into the +CONTENTS
-- end quote

Since that time, I have discovered that "@option extract-in-place"
doesn't work either.

pkg_add is such scary code that I have never worked up the courage to
try to fix it.  I could almost trivially make my modified version of
distrib/sets/regpkg add "@exec mkdir" commands to the syspkgs, but
I have not done so.

--apb (Alan Barrett)