[arch-haskell] How to translate "parsec >= 3.0 || == 2.1.*"? (was: Adding another data file for dependency "hints")

Xyne xyne at archlinux.ca
Sat Oct 12 07:37:52 UTC 2013

Peter Simons wrote:

> Hi Xyne,
>  > depends=('foo>=a' 'foo<=b').
> thank you very much for the clarification. Now, the only issue left is
> how to translate a specification like "parsec >= 3.0 || == 2.1.*". Since
> you know Pacman very well, I wonder whether you'd have a suggestion?
> Take care,
> Peter

There should only be one version of parsec available at any given time. If the
2.1.* series is still in the repos then use ('parsec>=2.1.0' 'parsec<2.2'). If
we've moved on to the 3.0 series then use ('parsec>=3.0').

Maybe I'm being overly simplistic here, but I don't see the problem. When would
we need to have multiple versions of parsec in the repos?

The real issue seems to be one of feeding this information to cabal2arch. It
needs to know at the time of generating the PKGBUILD which subset of packages
to expect. This should be provided in an external file that would allow use to
maintain a list of the current repo package versions (with flexible syntax that
allows the specification of series, e.g. foo>=3.0 to indicate that we're now
using foo 3.0 or above in the repos). This would also allow users to customize
this list for their own needs.

I'm sorry that I don't have the time to provide actual code right now, but I
would try to create a graph that walks the cabal files and detects dependency
intervals etc, then try to create a tool to let the user trace a path through
the graph to generate the list of versions. Basically, the user would be able
to select target nodes (i.e. specific versions of packages), and then a path
could be traced to satisfy all of those dependencies.

More information about the arch-haskell mailing list