archhaskell / habs

Arch Haskell ABS tree
http://github.com/archhaskell/habs
80 stars 28 forks source link

Automatic dependency resolution #154

Closed Profpatsch closed 10 years ago

Profpatsch commented 10 years ago

Atm I’m trying to get the yesod framework built which is quite a beast with a huge dependency tree.

So to do this my steps so far where these:

The last step took quite some time and could be done by the tool automatically.

Now I’m standing before a similar problem with building the PKGBUILDs for yesod. I thought maybe cblrepo pkgbuild yesod would work, but that throws a not very informative:

Failed to finalize package: yesod

When I try for example stringsearch (which has no dependencies other than installed packages) it works. That, too, could be made to work recursively automatically and would be a great help.

magthe commented 10 years ago

cblrepo is a tool for maintaining a repo of packages, and I've deliberately not put any effort into reducing the amount of concious action required, simply because I think concious action is a good thing in this particular case.

cblrepo pkgbuild doesn't require any packages to be installed on the system. The failure to finalize yesod is due to something else, but it's difficult to know exactly why. Patches improving the error reporting are more than welcome.

What exactly is it you think could be made work recursively?

Profpatsch commented 10 years ago

Okay, then maybe something with the cabal parser went wrong for the PKGBUILDS.

For recursiveness, it should at least check the archhaskell repo for resolvable dependencies (haskell-<dependencyname>) and ask for installation (I see that this is Arch-specific, but there is a pkgbuild command, too). Then when there are still dependencies left, it could ask if it should resolve them automatically.

Installing from archhaskell can be done recursively, for the hackage dependency resolving maybe it’s better to ask for each package’s dependencies (like yaourt does, for example).

magthe commented 10 years ago

cblrepo will never become a tool for installing packages.

Your comment makes me completely confused. I'm starting to suspect cblrepo wasn't even the tool you ought to have used :) What were you actually trying to accomplish?

Profpatsch commented 10 years ago

Creating all pkgbuilds for the yesod framework and then building it with pacman instead of cabal.

magthe commented 10 years ago

I fully understand that you find cblrepo inadequate for that task. As I wrote previously, cblrepo is geared towards maintaining a repo of Haskell packages for Arch Linux.

Profpatsch commented 10 years ago

wtf, isn’t that the same thing you do with Archhaskell?

In fact I started by cloning habs and adding packages from there, to eventually get yesod building like other haskell-* packages. So you are saying you are using a tool inadequate for the task?

magthe commented 10 years ago

Your goal, as I understand it:

Install yesod and its dependencies.

So you want automatic dependency resolution in cblrepo add (this ticket AFAIU), omitted version info chooses latest version (ticket #155). Stuff that helps you get fast to having a PKGBUILD.

My goal:

Long term maintenance of an Arch Linux repo containing 200+ Haskell packages.

So I want explicit control over versions, ability to patch packages on all levels. Stuff that helps me keeping the set of packages consistent, buildable, and close to the edge of Hackage.

So no! Our usage is not the same. I'm not saying cblrepo couldn't be made to support your goal more easily. I'm more than happy to accept patches!

Profpatsch commented 10 years ago

I see.

I don’t understand how getting a coherent set of package version is possible manually by hand, though. I’d assume that’s exactly the kind of things where computers excel. Have you looked at stackage?

magthe commented 10 years ago

http://www.haskell.org/pipermail/arch-haskell/2014-July/004741.html