Mojca Miklavec mojca at
Sun Apr 3 23:13:03 PDT 2016

On 3 April 2016 at 09:40, Takeshi Enomoto wrote:
> Hi,
> It seems that variants in default_variants are not proliferated as
> those specified in the command-line.
> I have this problem with some ports that I maintain and
> cause build failures with the buildbots.
> I would be helpful if you help me fix this.
> Takeshi
> ---
> Assume port A depends on port B+a.
> sudo port install A +a
> will install B+a, but when a is in default_variants in A
> A/Portfile:
> default_variants +a
> B is installed, not B+a.
> <>

Yes, this is the current behaviour and sadly there is no easy way to
enforce dependency on variants. The best you can do is explicitly test
that a dependency is installed with the same variant
(require_active_variants <port> <variant>), but port will fail in that
case and ask the user to resolve the situation manually. It helps a
lot if that variant is the default one in all dependencies.

During last year's GSOC a dependency resolver was being implemented.
Those who followed the development say that once the work gets
completed and merged into trunk (and then released), we'll get that
fixed "as a by-product".


More information about the macports-dev mailing list