Subject: Re: pkg_install problem
To: Eric Haszlakiewicz <erh@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 11/01/2004 12:37:51
On Mon, 1 Nov 2004, Eric Haszlakiewicz wrote:

> 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.

My custom pkg_add tool attempts to remove files from old package after it
installs the new package. (It has an installation that doesn't do a
pkg_delete first.)

> 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.

One concern I have is preserving the information in the +REQUIRED_BY
files. In this pkg_install case, it doesn't matter, but if this was to be
used for other packages, it might be important.

Also why the "-f -f" in the following?
+real-su-deinstall-flags+=      -N -f -f

Maybe it shouldn't need to be forced whern using -N.

Thanks for working on this.

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/