Subject: Re: Changes to reference count directories
To: Julio M. Merino Vidal <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 01/26/2005 10:52:38
Julio M. Merino Vidal wrote:
> I'd also like to see a way to recreate PKG_SYSCONFDIR from the examples
> tree.  Why?  Suppose you have PKG_SYSCONFBASE=/etc/pkg and /usr/pkg shared
> among several computers.
> It'd be nice to be able to simply recreate a clean /etc/pkg tree on each
> of the machines using the same /usr/pkg tree.
> Well, this could really affect all the files managed by the install scripts,
> not only those in PKG_SYSCONFBASE; i.e., any files needed under VARBASE, or
> any other place, could have to be recreated if necessary.

I've decided to move toward a design for the +INSTALL script that makes
it "unpack" several sub-scripts into the package metadata directory,
e.g. +DIRS, +CONFIG, +USERGROUP, +SHELLS, etc. and then invoke them.
The sub-scripts would be written in such a way that they may be
separately invoked to repair installed packages.  In the scenario you
described above, this would be done by running "+USERGROUP ADD" "+DIRS
ADD" and "+CONFIG ADD" over all of the installed packages (assuming your
${PKG_DBDIR} is also under shared via /usr/pkg) on each machine that
mounts /usr/pkg.  I'll probably create a helper sub-script just to run
these in the correct order to fix installed packages.


	-- Johnny Lam <>