On Fri, Dec 10, 2010 at 8:58 AM, Xyne <xyne@archlinux.ca> wrote:
Hi,
Would it be possible to implement support for alternative dependencies, e.g. a package that could use either wget or curl to handle downloads?
I know that "provides" can be used to do this, e.g. openjdk6 and jre both provide java-runtime to satisfy that dependency in other packages. The approach is limited though. Using the example above, we couldn't simply add "provides=('download-client')" to both curl and wget because they are not interchangeable. Yes, this is definitely a slightly different problem. To continue your sentence, "not interchangeable in all cases".
The basic usage case is when an application is capable of detecting any one of a number of different external apps that it can use to satisfy a given dependency. There is currently no way to depend on "at least one" of those. You went abstract here- how many real packages would benefit from this sort of thing at the moment? What are they?
I can imagine a very simple syntax for this too, e.g. "depends=('curl || wget')" so the question is whether the dependency-handling mechanism could be adapted to check for alternatives. If none are found, it could probably use the upcoming "provides" selection dialogue to allow the user to choose the desired dependency. I'm sure we could, and the syntax isn't all that bad.
So, would that be possible? Also, would that be acceptable? Possible yes. Acceptable- I don't have any serious objections. The only thing that comes to mind is the likelyhood of abuse as a replacement for provides, when that is the better facility to express this.
-Dan