[Haskell-cafe] Hackage on Linux

Mathew de Detrich deteego at gmail.com
Tue Aug 24 03:45:14 EDT 2010


On Tue, Aug 24, 2010 at 5:55 AM, Ivan Lazar Miljenovic <
ivan.miljenovic at gmail.com> wrote:

> On 24 August 2010 15:50, Mathew de Detrich <deteego at gmail.com> wrote:
> > I used to use archlinux packages however it became a pain for the
> following
> > reasons
> >
> > - packages on archlinux don't auto update when cabal does. This becomes
> > really annoying when package X gets updated on cabal but not on arch and
> > causes conflicts with other packages
>
> Huh?  Are you referring to doing a "cabal update"?  If so, how is this
> causing conflicts?  Are you mixing and matching distro packages with
> packages installed by hand?
>

No I am referring to doing an update through packer -Syu or clyde -Syu (the
archlinux wrappers for updating packages uploaded through aur). Right now I
just use standard cabal-install, because I got sick of this happening (and
haven't had any issues)

>
> I thought Don kept the external Haskell repository up to date with the
> packages on Hackage...
>
They are not auto updated, they are updated whenever a maintainer updates
them. You can check here for more info
http://www.galois.com/~dons/arch-haskell-status.html

If the aur packages were auto-updated (assuming they could be built)
whenever a package was updated on hackage, that would be a different story

>
> > - in some situations doing a general update with arch (through clyde or
> > packer)  breaks ghc (last time it happened packer tried to
> uninstall/update
> > arch packages which failed because those packages had dependencies. The
> > files got removed but since unregister failed ghc thought they still
> > existed)
>
> Is this the problem with bad packages or the package manager playing up?
>

What happened at the time, was updating haskell-gtk (or gtk on cabal) caused
packer (the package manager for AUR) to uninstall/update the haskell-gtk
packages (can't remember which one). So when the haskell-gtk package (and
its dependancies) where installed, it obviously invoke ghc-pkg unregister
(which is what you are meant to do when you uninstall a package). However
other packages dependant on those haskell-gtk packages, which meant that
ghc-unregister failed (obviously) however the library files were still
removed, which for obvious reasons broke ghc. This has happened many times
before though (around 3 times for me)

Another much more common issue is when you are trying to install some
package (through AUR) and it has dependencies on some packages (also through
AUR) however that package happens to be outdated. So then you have to
manually build the package, and if it depends on some other packages things
get even worse (kind of like dependency hell, haskell version). With just
using cabal, you can do cabal install or cabal update. Again this is an
issue that goes to my previous point, where packages on AUR (that are not
just the base ones) aren't fully updated

Note that these problems aren't just foreign to Haskell, other languages has
it as well (to some degree). I have had similar issues with building
outdated C/C++ programs, its just that due to the way people program/build
in C/C++, they use a few huge libraries (as opposed to a large collection of
smaller libraries) so when problems do occur you don't have
many dependencies that you have to deal with. In Haskell, its not uncommon
to have libraries/programs with >15 dependencies. I actually prefer the
Haskell way of doing things, because its much more modularized, it just
means that if you have issues with dependencies in libraries they are
amplified. Ruby is another language that favors using many libraries,
however everyone that uses Ruby just uses gems (kind of equivalent of
cabal-install) and Ruby being a primarily interpreted/scripted language
makes things less painful then one that is primarily compiled (such as
Haskell)

> > Apart from base/required packages, unless your linux distro has proper
> > metapackages its in my opinion just better off using cabal install (and
> only
> > use arch packages for binaries)
>
> What do you mean by "metapackages"?
>
> Metapackages would mean that when you do an update/install through your
distro (for my archlinux system it would be packer -S haskell-gtk for
example) then it wouldn't actually install (or sync) a package containing
files. Instead what would happen is that invoking packer -S haskell-gtk
would just invoke a cabal-install (with a pre-configured .config file I am
assuming). More importantly, if you do something like ghc-unregister on a
package and it fails, the package wouldn't actually successfully uninstall
(and screw up ghc) as it did in my example above

> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> IvanMiljenovic.wordpress.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100824/49470253/attachment.html


More information about the Haskell-Cafe mailing list