Handling the movement of a header file between packages

Clemens Lang cal at macports.org
Wed Dec 28 13:36:08 PST 2011


Hi,

On Wed, Dec 28, 2011 at 09:21:33PM +0000, Adam Mercer wrote:
> In one of the ports I maintain a header has moved from one package
> into a new package, this new package is a dependency of the package
> that the header moved from. When upgrading port tries to install this
> new package but fails to activate as it wants to install this header
> file but as it is provided by the older version of the dependent
> package this header is already present. Is there a way to handle this
> in the Portfile without having to manually uninstall the older version
> of the dependent package prior to activation of the new package?

you could add a pre-activate-block, check for the existance of the file,
check whether it is owned by the old port and if it is, remove it and
delete the registry entry for it.

That probably only possible using MacPorts-internal interfaces for the
registry, though. I'm not sure deleting the file without removing it
from the registry is enough for the activation to continue successfully
and it probably is not good idea anyway in regard to database
consistency.

-- 
Clemens Lang
GSoC Student



More information about the macports-dev mailing list