Subject: Re: did the "make reinstall" functionality get slightly broken in
To: NetBSD Packages Technical Discussion List <>
From: Hubert Feyrer <>
List: tech-pkg
Date: 03/02/1999 21:19:01
On Tue, 2 Mar 1999, Greg A. Woods wrote:
> 	make reinstall FORCE_PKG_REGISTER=yes
The're 's your problem, as Todd already stated. Use "make deinstall
reinstall" instead (it's even shorter).

> I now see the problem too.  Setting FORCE_PKG_REGISTER only removes the
> package-specific files in the ${PKG_DBDIR}.  It doesn't clean up the
> merged database (i.e. pkgdb.byfile.db) at the same time, but it should.

Setting FORCE_PKG_REGISTER _only_ forces the package to be registered
(again) even if it was already there before - hence the name. 
The usual "install" target will just not care if the files did exist
before and overwrite them, but the pkgdb code in pkg_create is a bit more
cautious, but that's not the only one. If you use some package that tries
to do some @exec/@unexec-replacements in Makefile, you can fail as badly.

Again: Do NOT use FORCE_PKG_REGISTER. Use "make deinstall".

Forcing things with a sledge hammer may fix some things, but it tends to
break more other things - as you see for your case here.

> I don't see an easy way to do that without re-building that part of the
> database from scratch.  Perhaps pkg_delete needs the equivalent of
> "pkg_create -O" to ``fake'' the deletion of the package.

This step would still be needed to be called somewhere -> you're back at
the "make deinstall" here. 

Don't blame the existing code to be lame not to address problems you cause
yourself by not following standard uses. :)

 - Hubert

Hubert Feyrer <>