".. is already installed" errors during ports update

I use portmaster -a to update my ports and frequently see the following error:

Code:
[...]
===>  Installing for gettext-runtime-0.19.4
===>  Checking if gettext-runtime already installed
===>  gettext-runtime-0.19.4 is already installed
  You may wish to ``make deinstall'' and install this port again
  by ``make reinstall'' to upgrade it properly.
  If you really wish to overwrite the old port of gettext-runtime
  without deleting it first, set the variable "FORCE_PKG_REGISTER"
  in your environment or the "make install" command line.
*** Error code 1

Stop.
make[2]: stopped in /basejail/usr/ports/devel/gettext-runtime
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/devel/gettext-tools
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/devel/gettext-tools

===>>> make build failed for devel/gettext-tools
===>>> Aborting update

===>>> Update for devel/gettext-tools failed
===>>> Aborting update

===>>> There are messages from installed ports to display,
  but first take a moment to review the error messages
  above.  Then press Enter when ready to proceed.

Why is ".. is already installed" a problem? Why " make reinstall to upgrade it properly" when portmaster just told me that the package is already available in the right version?
 
Have you checked /usr/ports/UPDATING? At some point--not sure when--there were some changes made to the way gettext is installed. I think (not on FreeBSD right now, and too lazy to look), that you have to remove it and reinstall it and something else---but follow the instructions and make sure you have another root window open, because it temporarily breaks sudo.
 
It happens randomly and regularly with different packages (today sqlite3-3.8.8.2), so I don't think it had something to do with gettext-tools.

(Edit: ..and sqlite3 was updated as a dependency of py-sqlite3.)
 
Reread your error and follow the advise scottro gave.
Straight from /usr/ports/UPDATING:
Code:
20141130:
  AFFECTS: users of devel/gettext (close to everyone)
  AUTHOR: tijl@FreeBSD.org

  The devel/gettext port has been split up in devel/gettext-runtime, a
  lightweight package containing runtime libraries, and devel/gettext-tools,
  a package containing developer tools.  The devel/gettext port still exists
  as a metaport.

  You must first delete the existing installation of gettext and then
  reinstall it.  This will break sudo, so you *must* do this in a root
  shell (sudo -i) if you use sudo.

  # pkg delete -f gettext
  # portmaster devel/gettext

  Or for portupgrade users:

  # pkg delete -f gettext
  # portinstall devel/gettext

  Or for binary users:

  # pkg delete -f gettext
  # pkg upgrade
 
Back
Top