Subject: Re: everything is a dependency and preventing removal
To: NetBSD Packages Technical Discussion List <tech-pkg@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 01/10/2003 16:33:29
On Fri, 10 Jan 2003 13:35:27 -0500 (EST), "Greg A. Woods"
<woods@weird.com> wrote:
> > Can anyone share an ideas, experiences or examples of other operating
> > system packaging tools for preventing accidental removal of important
> > packages?
> > 
> > For example, pkg_add may need tar, maybe gzip libs, maybe ftp, and
> > maybe some basic shell utils.
> 
> All I can say is that the way pkgsrc iteslf does this now (by not
> registering the installed package) is completely bogus.

Why not keep two databases, say, /var/db/pkg/ and /var/db/syspkg?  Then
the immutability of the package wouldn't be an attribute of the package,
but rather of its installation, protected by separate privileges.  A
knowledgeable user could move (especially if a "pkg_chmod" tool were
available) a package's database records back and forth, which could be a
handy feature.  

Likewise, whether or not a package is integral to the system depends on
the value of "system".  How it should be treated/installed is a function
of what OS we're talking about.  I would put that information with other
system-dependent lists, in /etc.  That may lead to a certain amount of
per-OS tailoring.  

While I'm more-or-less on the subject, will someone please explain to me
why /var for the database?  It's not a dynamic set of data, the way mail
spools and logs are.  It can't be blown away without dire consequences,
the way /var can otherwise be.  It's fairly static system configuration
information.  The right place is /usr/pkg/var, because:

1. it's integral to /usr/pkg
2. it shares the read-only or r/w requirements of /usr/pkg
3. it doesn't steal from /var, which needs headroom

I'm sure I'm not the first guy to observe this.  What am I missing?

--jkl