Subject: Proposal: do not overwrite old versions
To: None <>
From: Hubert Feyrer <>
List: tech-pkg
Date: 02/14/1999 04:54:42
Right now, if a package foo-1 is installed and we "make install" for
foo-2, the files of the old one are overwritten without further action. 
Upon deleing either, this will cause problems, inconsistencies and endless

pkg_add does check for older versions for quite a while, I would like to
teach to do the same at "make install" time, suggesting proper

miyu# make install
===>  Installing for nmap-2.07
===>  nmap-2.03 is already installed - perhaps an older version?
      If so, you may wish to ``pkg_delete nmap-2.03'' and install
      this port again by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of nmap-2.03
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Note i replaces ${PKGNAME} with what was actually found, and replaced
"make deinstall" with a cut-and-paste-ready "pkg_delete'-command, which
will work for older packages (contrary to "make deinstall").

The behaviour that any user can still overwrite old packages by setting
FORCE_PKG_REGISTER is not changed.

Please let me know if I'm missing something with this patch, else I will
put it in. Thanks.

 - Hubert

Hubert Feyrer <>