Checking if a given port is installed in pre-fetch

Ryan Schmidt ryandesign at macports.org
Mon Mar 3 13:13:16 PST 2008


On Mar 3, 2008, at 10:18, Daniel J. Luke wrote:

> On Mar 2, 2008, at 2:09 PM, Adam Mercer wrote:
>
>> On Sun, Mar 2, 2008 at 12:16 PM, Daniel J. Luke wrote:
>>
>>> You can do almost anything from within a portfile, but there are  
>>> lots
>>> of things that you maybe shouldn't.
>>>
>>> What are you trying to accomplish?
>>
>> I want to upgrade the science/geos port to 3.0.0 but
>> matplotlib-basemap requires geos-2.2.3 and will not work with
>> geos-3.0.0. Unfortunately it doesn't appear possible to install both
>> geos-2.2.3 and geos-3.0.0 at the the same time, so I was wondering if
>> there was a way that I could make a port for each version and mark
>> them as conflicting?
>
> There's not a built-in way to do this (but it might be a nice base/  
> feature), and I don't know of a really good way of doing it (you  
> could probably check for an installed binary in a pre-fetch action  
> and output an appropriate ui_error message).

Not in pre-fetch, please. This would trip up anybody trying to "sudo  
port upgrade" the port.

> Ideally, it would be good to modify one or both of the ports so  
> that they can both be installed

Yes, that would be the best way to have two different versioned  
ports. We don't always meet this goal (apache can't be installed with  
apache2; php4 can't be installed with php5...) but we should.

> (or get things patched/updated so they can work with the newer  
> version of the port).

That would be ideal.

> As an alternative, having the science/geos port updated and adding  
> a new port for the old version that matplotlib-basemap uses might  
> be ok (especially if it's unlikely that someone might want both  
> ports).




More information about the macports-dev mailing list