Subject: Re: preserving pkgs? [was: Re: CVS commit: src/usr.sbin/pkg_install]
To: None <tech-pkg@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 01/18/2003 15:03:35
Hubert Feyrer wrote:

> On Fri, 10 Jan 2003, Alistair G. Crooks wrote:
> > Log Message:
> > Introduce the notion of "preserving" an installed package.
> >
> > A preserved package may not be deleted by pkg_delete(1) (unless the -f
> > option is given), and the preserved capability will be carried into
> > any binary package. pkg_add(1) will also keep the preserved capability
> > if it was present in the binary package.
> >
> > The "preserve" capability can be given to a package by using the
> > PKG_PRESERVE definition in a package Makefile in pkgsrc.
> 
> What is the idea behind this, where does one use it?

The reason we haven't been registering pkgtools/pkg_install (for
instance) as a package is to prevent it from being removed, because
the consequences of removing it would be bothersome. Other than
that, it's a package and should behave like one. AIUI, this change
will allow us to register such packages normally, while still
preventing their removal.

Of course, we'll have to bump PKGTOOLS_REQD before we can rely on
this feature in package Makefiles.

- Amitai