Handling the movement of a header file between packages

Ryan Schmidt ryandesign at macports.org
Wed Dec 28 14:49:42 PST 2011


On Dec 28, 2011, at 15:21, 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?

The way we have handled this in other ports before is to use the "deactivate hack": At pre-activate, you test whether the header already exists, and if so, if a version of that other port is active that is known to have provided the header; if so, you deactivate that port. See examples here:

https://trac.macports.org/ticket/28865#comment:3




More information about the macports-dev mailing list