portmaster [portname] already installed

I have been trying out portmaster lately. I seems great, but I keep having builds bail out because a port is already installed. Here is an example:

===>>> Starting check for runtime dependencies
===>>> Gathering dependency list for print/ghostscript8 from ports
===>>> Starting dependency check
===>>> Dependency check complete for print/ghostscript8
        teTeX-base-3.0_13 >> print/ghostscript8

===>  Installing for ghostscript8-nox11-8.63
===>   Generating temporary packing list
===>  Checking if print/ghostscript8 already installed
===>   ghostscript8-nox11-8.63 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 print/ghostscript8
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/print/ghostscript8.
*** Error code 1

Stop in /usr/ports/print/ghostscript8.

===>>> Installation of ghostscript8-nox11-8.63 (print/ghostscript8) failed
===>>> Aborting update

===>>> Update for /usr/ports/print/ghostscript8 failed
===>>> Aborting update

polaris# uname -a
FreeBSD polaris.turnerinfotech.local 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

This has happened on other portmaster upgrades too.

Any suggestions?
In this case:
===>  Installing for ghostscript8-nox11-8.63
===>   ghostscript8-nox11-8.63 is already installed

Is that not correct? It seems you are trying to upgrade something you already have the latest version of in ports.

You could confirm with:
%pkg_info | grep 'ghostscript8'

If you'd like to reinstall the same port, just follow the instructions there.
This is normally an error in the Makefile of the port. Portmaster checks the dependency and recognizes it is fulfilled.

However the ports system does its own check and it does so by checking the existence of a file. It might be that the port does no longer install said file and thus the ports think the dependency needs to be built and installed.

Unfortunately before installing it, it will recognize that it's already there and cancel the install.

The best fix is to correct the wrong dependency check of the port.
Thanks for the info.

Why is it trying to re-install ghostscript8-nox11 anyways? It is already up to date.

I seem to have continual problem with updating packages and ports. I have _never_ run a complete update without error.

Am I missing something?

Seems we have a choice between never updating and spending hours working out the problems in ports.

Is there a better way?
ports that cannot be bumped ? or upgrades that go wrong?
consider : (I recently started a mini-log on paper
of these few types so I know why I should skip them)...

1.... won't build (xaralx, abraca, cinepaint, helixplayer )
2.... minor upgrades not needed (teTex-base...)
3... cannot upgrade because of dependency conflicts ( nettop,
nip2, treeline, vips, slrn )
4... would take too long (firefox2, gcc42,....)
5... obsolete ports (emacs20...)
6... too complicated (/xorg/) would pull in additional ports...

Those are a few of over 1000 ports installed. So before I upgrade
a port, I ascertain if it is "usual" or affected by UPDATING or some
other condition (dependency change.) If it is 'usual', I can
submit it to portmanager, portupgrade, or portmaster (but usually
use locally-written shell scripts instead)
I update daily, so a) if I encounter problems, it's only one at a time and easy to resolve and b) I rarely encounter problems.

It seems that huge updates are more error prone, probably because the case of updating a large number of ports is rarely tested.