New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #126 (new enhancement)

Opened 9 years ago

Last modified 13 months ago

dependencies need to allow inclusion of variant

Reported by: jpm@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version:
Keywords: Cc: narf_tm@…, nox@…, clubjuggler@…, macsforever2000@…, illogical1@…, myschizobuddy@…, ryandesign@…, bryan@…, vinc17@…, kngspook@…, mcalhoun@…, ocroquette@…, devans@…, febeling@…, and.damore@…, pgnet.dev+macports@…, jim@…, vitaly@…, stromnov@…, guillaume-jean@…, staffan@…, neumann@…, djsnickles@…, bernard@…
Port:

Description (last modified by ryandesign@…) (diff)

some ports will never be installed directly but rather as dependencies from other. it would be nice to allow the top level port to define a specific variant in its dependency rather than always dealing with the lowest common denominator...

Change History

  Changed 9 years ago by kevin@…

*** Bug 127 has been marked as a duplicate of this bug. ***

  Changed 9 years ago by kevin@…

  • status changed from new to assigned

Yes, this should be part of a larger goal to specify arbitrary options in a dependency. My current thinking is something along the lines of the following:

{bin:nethack:nethack +x11 option=value}

  Changed 7 years ago by kevin@…

  • owner changed from kevin@… to darwinports-bugs@…
  • status changed from assigned to new

Reassigning bugs in my queue to where they belong.

  Changed 7 years ago by toby@…

  • cc narf_tm@… added

  Changed 7 years ago by toby@…

*** Bug 3091 has been marked as a duplicate of this bug. ***

  Changed 5 years ago by pipping@…

  • milestone set to MacPorts 1.5

  Changed 5 years ago by nox@…

  • cc narf_tm@…, nox@… added; narf_tm@… removed

  Changed 5 years ago by nox@…

  • version 1.0 deleted

  Changed 5 years ago by nox@…

  • priority changed from Expected to Normal

  Changed 4 years ago by jmpp@…

  • milestone changed from MacPorts 1.5 to MacPorts base enhancements

  Changed 4 years ago by clubjuggler@…

  • cc clubjuggler@… added

Cc Me!

  Changed 3 years ago by macsforever2000@…

  • cc macsforever2000@… added

Cc Me!

  Changed 3 years ago by illogical1@…

  • cc illogical1@… added

Cc Me!

  Changed 3 years ago by myschizobuddy@…

  • cc myschizobuddy@… added

Cc Me!

  Changed 3 years ago by myschizobuddy@…

Now that a new PortMgr team is announced. would we see this in Macports soon?

  Changed 3 years ago by ryandesign@…

  • cc ryandesign@… added
  • description modified (diff)

I think this bug was probably filed before any of the new PortMgr team ever heard of MacPorts. :) As least, it predates my involvement in the project, so it is nowhere on my list of things to do yet. I see Paul has been doing some work that may relate to this ticket (see r41526) but if you would like to discuss why this should be implemented and how it could be done, by all means bring it up on macports-dev. When a consensus is reached, more code can be written.

  Changed 3 years ago by bryan@…

  • cc bryan@… added

Cc Me!

  Changed 3 years ago by vinc17@…

  • cc vinc17@… added

Cc Me!

  Changed 3 years ago by kngspook@…

  • cc kngspook@… added

Cc Me!

  Changed 3 years ago by mcalhoun@…

This enhancement is required for a proper fix of #17452.

  Changed 3 years ago by ryandesign@…

  • cc mcalhoun@… added

As I wrote above two months ago, there hasn't yet been any decision on how or even whether this should be done. There certainly exist reasons why we would not want to implement this. By all means bring it up on macports-dev so it can be discussed.

  Changed 3 years ago by ocroquette@…

  • cc ocroquette@… added

Cc Me!

  Changed 3 years ago by ocroquette@…

Are there any ways to at least warn the user if his current variant of the dependency doesn't fit ?

follow-up: ↓ 35   Changed 3 years ago by ryandesign@…

The simplest would be to check whether a file you need is present or not. For example, if you need that port foo is installed with variant +bar, and variant +bar causes port foo to install the file ${prefix}/lib/libfoobar.dylib, then declare a dependency on port:foo and in the pre-fetch phase check if the file ${prefix}/lib/libfoobar.dylib exists, and if not, use return -code error to inform the user and exit.

  Changed 3 years ago by ocroquette@…

OK, I will try that, thanks.

follow-up: ↓ 27   Changed 3 years ago by jm@…

A good example are the kdenlive + MLT + FFmpeg ports (some yet not committed to SVN). FFmpeg provides that codecs. MLT is the rendering and video engine. Kdenlive is only a GUI.

To work correctly, you need to install MLT with all FFMPEG variants. But what you consider a variant is not a variant but a real need in FFmpeg case.

So I expect most users to run "port install kdenlive". And this will install MLT with FFmpeg-devel. But with most codecs missings!

in reply to: ↑ 26   Changed 3 years ago by ryandesign@…

Replying to jm@…:

But what you consider a variant is not a variant but a real need in FFmpeg case.

Then perhaps the ffmpeg port should be changed to have some of its variants removed and incorporated by default instead; you could file a separate ticket for that or discuss it with ffmpeg's maintainer.

  Changed 3 years ago by devans@…

  • cc devans@… added

Personally, I favor including all of these variants as the default for ffmpeg as the utility of the library and app is the broad coverage that is provided. However, the opposing point of view is that the current port is just following the distribution's own distinctions at configure time as to what is default (ffmpeg's builit in codecs) and what is optional (codecs based on external libraries like libx264). So what is MacPorts policy on this. Is it permissible to make everthing the default? Or should we follow the developers lead? If the latter how about making a separate port (ffmpeg-full for example) that includes everything that can be depended upon by ports that need it.

follow-up: ↓ 30   Changed 3 years ago by ryandesign@…

Discussion about changing the ffmpeg port should occur in a new ticket about ffmpeg, or on a MacPorts mailing list, not in this ticket.

in reply to: ↑ 29   Changed 3 years ago by devans@…

Replying to ryandesign@…:

Discussion about changing the ffmpeg port should occur in a new ticket about ffmpeg, or on a MacPorts mailing list, not in this ticket.

Sorry just responding to your lead.

  Changed 3 years ago by febeling@…

  • cc febeling@… added

Cc Me!

  Changed 3 years ago by and.damore@…

  • cc and.damore@… added

Cc Me!

  Changed 3 years ago by pgnet.dev+macports@…

  • cc pgnet.dev+macports@… added

Cc Me!

  Changed 3 years ago by jim@…

  • cc jim@… added

Cc Me!

in reply to: ↑ 24   Changed 3 years ago by jim@…

Replying to ryandesign@…:

The simplest would be to check whether a file you need is present or not. For example, if you need that port foo is installed with variant +bar, and variant +bar causes port foo to install the file ${prefix}/lib/libfoobar.dylib, then declare a dependency on port:foo and in the pre-fetch phase check if the file ${prefix}/lib/libfoobar.dylib exists, and if not, use return -code error to inform the user and exit.

An example where this is tougher (and where almost none of the portfiles are committed yet):

I'm working to create a port for evolution-exchange@2.26.2, the Exchange connector for Evolution, the Gnome mail client. Ideally, a user who knows they want to plug Evolution into MS Exchange should be able to:

sudo port install evolution-exchange

... and everything else just fills in.

Here's the dependency chain:

  • evolution-exchange@2.26.2 requires evolution@2.26.2+exchange
  • evolution@2.26.2+exchange (which adds the config flag --with-exchange) requires evolution-data-server@2.26.2+exchange
  • evolution-data-server@2.26.2+exchange (which adds the config flags --with-krb5 --with-openldap) requires openldap@2.3.35_2+evolution_ntlm
  • openldap@2.3.35_2+evolution_ntlm ironically, applies an NTLM patch found in evolution-exchange-2.26.2/docs/openldap-ntlm.diff

The best part: evolution-data-server's ./configure looks to see that it can successfully link ldap_ntlm_bind and, if not, refuses to fail; instead, it just prints a warning (which is dutifully suppressed unless you run port -v ...) and continues without error, but without configuring NTLM on. But that's neither here nor there for this discussion.

I'm also aware that we can't do versioned dependencies. We'll ignore that for now, too.

In order to install Evolution fully ready to talk to Exchange, a user would have to type:

sudo port install openldap +evolution_ntlm
sudo port install evolution +exchange # this gets evolution-data-server too
sudo port install evolution-exchange

In the name of reducing user-facing complexity, I could:

  • Name the openldap variant "exchange" which is consistent with the other ports, but less expressive of what the variant actually changes
  • Add a dummy "exchange" variant to evolution-exchange

Then it would be:

sudo port install evolution-exchange +exchange

... which is a bit redundant, but survivable.

So I'm caught between a desire to package this accurately, which inflicts upon the user the need to understand all the moving parts in their many particulars, or the desire to help the user be successful, which makes the packaging kinda kludgy.

Sure would be nice to be able to specify

  depends_lib   port:evolution-data-server@${version}+exchange

... and have that resolve properly.

  Changed 3 years ago by jmr@…

  • reporter changed from jpm@… to jpm@…

  Changed 2 years ago by vitaly@…

  • cc vitaly@… added

Cc Me!

  Changed 2 years ago by stromnov@…

  • cc stromnov@… added

Cc Me!

  Changed 2 years ago by guillaume-jean@…

  • cc guillaume-jean@… added

Cc Me!

  Changed 20 months ago by staffan@…

  • cc staffan@… added

Cc Me!

  Changed 19 months ago by neumann@…

  • cc neumann@… added

Cc Me!

  Changed 16 months ago by djsnickles@…

  • cc djsnickles@… added

Cc Me!

  Changed 13 months ago by bernard@…

  • cc bernard@… added

Cc Me!

Note: See TracTickets for help on using tickets.