py2?-pyqt4* dependents

Ryan Schmidt ryandesign at macports.org
Wed Nov 27 08:18:52 PST 2013


On Nov 27, 2013, at 09:39, Peter Danecek wrote:

> recently when I was upgrading `qgis`, I realised that its dependency on `py2?-pyqt4-devel` potentially causes conflicts which are not easily resolved by users.
> 
> qgis depends on `port:py2?-pyqt4-devel`, while most other ports depend explicitly on `port:py2?-pyqt4`. There are few ports (python/py-matplotlib & science/gnuradio) which use `path:*` so their dependency is resolved by both.
> 
> Now, I imagine that qgis' dependency is due to some specific feature which the port requires. Maybe Vincent could confirm this is the case. But I imagine that py2?-pyqt4-devel would satisfy the requirements of all other dependents of py2?-pyqt4 as well. 
> 
> So are there any objections to implement such changes?

At present, if there is more than one port that can satisfy a dependency, other ports should declare a dependency on those ports using a path:-style depspec.


> Side question / discussion:
> 
> I have limited understanding of the Macports base, but I wonder if it would be to difficult to implement a mechanism which would allow to specify several alternative ports instead of the `path:` syntax. What I have in mind is something like this:
> 
> depends_lib-append      {port:py27-pyqt4 port:py27-pyqt4-devel}
> 
> in analogy to the license specification. If any of the dependencies in the braces exist, this dependency would be satisfied, if not the first is installed. 
> 
> An alternative solution to this generic problem could be to specify in the `py2?-pyqt4` port itself that it could be substituted (not "replaced") with a (set of) other ports (here: py2?-pyqt4-devel). At the condition that any of these ports is already installed, dependents would use that port instead. This would avoid to have to change a potentially large set of dependent ports in case an alternative port becomes available and I have the impression that part of the logic can be shared with `replaced_by`. But again, unfortunately I do know to little about base and registry.

You’re talking about https://trac.macports.org/ticket/16336 . Yeah, that would be nice. Until we have it, though, path:-style dependencies are what we have to use.



More information about the macports-dev mailing list