Need Help with the "conflicts_build" PortGroup

Daniel J. Luke dluke at geeklair.net
Mon May 22 01:40:09 UTC 2023


The generic rule is "do not do this"

Ports are all intended to work with the current other ports as distributed by MacPorts - when you install or upgrade a port MacPorts will walk the dependency tree and install or upgrade all of the necessary things first, so your port can assume the 'current' version of things it declares to be installed.


> On May 20, 2023, at 11:35 AM, Robert Kennedy <amtor at hotmail.com> wrote:
> 
> It looks like I can tell whether a port is installed and get the version of a installed port in question via the MacPorts registry API.  But I do not see any docs on how to use the MacPorts registry API in a Portfile.  
> 
> Once I know whether a port is installed and its version number, I should be able to use conflcts_build-append in a tcl block in the Portfile (e.g. in a pre-configure{} or pre-build{} block.  pre-configure{} probably makes the most sense).
> 
> Can someone point me to some docs on how to use the MacPorts registry API or to some example Portfiles?
> 
> Rob
> 
> From: macports-dev <macports-dev-bounces at lists.macports.org> on behalf of Robert Kennedy <amtor at hotmail.com>
> Sent: May 20, 2023 9:47 AM
> To: macports-dev at lists.macports.org <macports-dev at lists.macports.org>
> Subject: Need Help with the "conflicts_build" PortGroup
>  I am upgrading a port where only certain installed releases will prevent the building of the upgraded port. 
> 
> Is there a way to use conflicts_build from the conflicts_build PortGroup with only certain installed releases?  Maybe it could be done by using a pre-build {} tcl block?
> 
> Is there a global variable available that is set to the installed version number?  
> And is there an easy way to tell if a port is already installed before upgrading?
> 
> Rob


-- 
Daniel J. Luke



More information about the macports-dev mailing list