Subject: Re: /var/db/pkg vs. syspkgs + pkgsrc (was: CVS commit: src/distrib/sets)
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: Greg A. Woods <>
List: tech-userlevel
Date: 11/12/2004 14:07:46
[ On , November 12, 2004 at 08:49:03 (-0500), Greg Troxel wrote: ]
> Subject: Re: CVS commit: src/distrib/sets
>   fwiw, it's *extremely* convenient to be able to rm -rf /usr/pkg and
>   /var/db/pkg and start from scratch, on any pkgsrc system, anywhere.
> I agree, and I do this

Me too!  :-)

(in fact I like to newfs $PREFIX if it's a separate filesystem....)

However I also really do like the idea of having a single /var/db/pkg
for both syspkgs and add-on 3rd-party packages from pkgsrc and the
ability to use pkgsrc to replace/upgrade system packages (e.g. user-land
subsystem things like BIND, a mailer, ntpd, or whatever, even "sh" or

I.e. I would _very_ gladly give up the quick-and-dirty "newfs /usr/pkg
&& rm -rf /var/db/pkg" trick in order to be able to blur/ignore the
fuzzy lines between pkgsrc and syspkgs.

> but usually 'pkg_delete -r \*', and then
> delete crud from /usr/pkg, saving etc.

No sense wasting your time and your computer's time doing that though
unless you're actually going to spend some time working out what files
were not registered propererly, which packages they should belong to,
and getting them fixed.....  :-)

> Someone else mentioned NFS.  I've always found it odd that /var/db/pkg
> isn't in e.g. /usr/pkg/var/db/pkg.  With that, one could
> reasonably NFS mount a /usr/pkg for some arch, and even modify it from
> any of several machines.  And, it would make using pkgsrc on a FreeBSD
> system easier, since ports and pkgsrc could coexist, modulo which
> prefix was used to select pkgtools versions.

No, that's not right.  There should (perhaps "MUST") only be _one_
master package management host.  The pkg_install "package" shouldn't
even be installed on the other clients that share /usr/pkg.

though not having pkg_info on the clients is indeed a pain so the one
time I experimented with a shared /usr/pkg I NFS mounted the /var/db/pkg
directories read-only on the clients too and that sort of worked OK....

Off on the tangent of sharing /usr/pkg it would be very nice to have
some pkg_blah command to (re)set up the necessary default config files
and run the INSTALL script and such too so that clients could
(re)initialize themselves.  Having to figure out what was done at
install time and redo it manually on the clients is a royal pain.

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>