Subject: Re: pkg_install problem
To: John Klos <john@ziaspace.com>
From: Eric Haszlakiewicz <erh@NetBSD.org>
List: tech-pkg
Date: 11/01/2004 14:17:19
On Mon, Nov 01, 2004 at 08:50:12AM -0800, John Klos wrote:
> > I think the problem of not be able to upgrade the pkg_install package
> >needs to be fixed, probably by having the update/replace targets be
> >a little more intelligent about installing it. Perhaps add an option to
> >pkg_delete that will delete the package registration but not the actual
> >files.
>
> I agree, but it needs to happen quickly if the currently broken behaviour
> is what is in the tree ATM.
ugh, well I've got a partial solution:
1) Added a -N option to pkg_delete to remove the package registration
and package database entries. Files are not removed. @unexec lines
are not run. Deinstall script is not run.
2) Added a few things to bsd.pkg.mk to use the -N flag when deinstalling
a PKG_PRESERVE package while performing a update or replace.
3) Set PKG_DELETE in pkg_install/Makefile to use the newly built binary
that includes the new flag.
Patch is at http://www.nimenees.com/pkgi.diff
Possible issues:
1) Upgrading to a package that has fewer/different files. This isn't
all that hard to fix, but it'll take more time than I have to work
on it today.
2) "make install" no longer means "make update" (do we care?)
3) I have no idea how this interacts with pkgviews or whether anything
special needs to be done there.
eric