
% cabal update Downloading package list from server 'http://hackage.haskell.org/packages/archive' % cabal install pureMD5 All requested packages already installed. Nothing to do. % cabal install pureMD5-0.2.4 Downloading 'pureMD5-0.2.4'... [...] Well, I might be spoiled by portage but shouldn't there be a thing like cabal upgrade pureMD5 and cabal upgrade --all ? -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or broadcasting of this signature prohibited.

On 2008 Sep 26, at 4:49, Achim Schneider wrote:
Well, I might be spoiled by portage but shouldn't there be a thing like
cabal upgrade pureMD5
and
cabal upgrade --all
snuffy:502 Z$ cabal help upgrade Usage: cabal upgrade [FLAGS] or: cabal upgrade [PACKAGES] -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Fri, 2008-09-26 at 10:49 +0200, Achim Schneider wrote:
% cabal update Downloading package list from server 'http://hackage.haskell.org/packages/archive'
% cabal install pureMD5 All requested packages already installed. Nothing to do.
% cabal install pureMD5-0.2.4 Downloading 'pureMD5-0.2.4'... [...]
The latest released cabal-install does what you want here. $ cabal install cabal-install
Well, I might be spoiled by portage but shouldn't there be a thing like
cabal upgrade pureMD5
That also works in the latest version. comparing, $ cabal install foo $ cabal upgrade foo both mean to get the latest 'foo'. The difference between install and upgrade is whether the dependencies are also upgraded or not. In Gentoo they call this 'deep' upgrades.
and
cabal upgrade --all
We write that as just $ cabal upgrade Duncan

A reminder:
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package
list
cabal update #download list of new packages
cabal upgrade #make any upgrades
Regards,
CS
2008/9/26 Duncan Coutts
On Fri, 2008-09-26 at 10:49 +0200, Achim Schneider wrote:
% cabal update Downloading package list from server 'http://hackage.haskell.org/packages/archive'
% cabal install pureMD5 All requested packages already installed. Nothing to do.
% cabal install pureMD5-0.2.4 Downloading 'pureMD5-0.2.4'... [...]
The latest released cabal-install does what you want here.
$ cabal install cabal-install
Well, I might be spoiled by portage but shouldn't there be a thing like
cabal upgrade pureMD5
That also works in the latest version.
comparing,
$ cabal install foo $ cabal upgrade foo
both mean to get the latest 'foo'.
The difference between install and upgrade is whether the dependencies are also upgraded or not. In Gentoo they call this 'deep' upgrades.
and
cabal upgrade --all
We write that as just
$ cabal upgrade
Duncan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
A reminder:
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list
cabal update #download list of new packages cabal upgrade #make any upgrades
Note that 'cabal upgrade' upgrades everything you've currently got installed (which in general is not necessarily possible). The standard workflow is just: cabal update #download list of new packages cabal install yi #install latest version of yi The difference between $ cabal install yi and $ cabal upgrade yi is whether we try to upgrade the dependencies of yi as well or just try to use any currently installed versions of yi's dependencies. If anyone has some good ideas on how we can make the first step more automatic then see ticket #359 http://hackage.haskell.org/trac/hackage/ticket/359 Duncan

When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list
cabal update #download list of new packages cabal upgrade #make any upgrades
I never knew there was a 'cabal update' command, and it worries me. In my unhappy experience of packaging systems (apt/Aptitude, fink/ FinkCommander, and DarwinPorts/MacPorts) it was never obvious when it should be necessary to run the update. Indeed, the advice given by each of these tools IIRC was to update every time you used it, before doing anything else. (So why was it a manual task then?) On the other hand, every one of those tools eventually failed for me on the update step, leaving me with an inconsistent and non-working configuration. Regards, Malcolm

On Wed, Oct 01, 2008 at 08:58:53AM +0100,
Malcolm Wallace
Indeed, the advice given by each of these tools IIRC was to update every time you used it, before doing anything else. (So why was it a manual task then?)
You can put it in cron (Ubuntu does it by default).
On the other hand, every one of those tools eventually failed for me on the update step, leaving me with an inconsistent and non-working configuration.
??? If something is wrong in the update step, the installed packages are not modified. If the database of *available* packages is corrupted (something I never saw with apt/aptitude or Gentoo's portage), then you cannot install new packages but existing packages work fine (the *available* packages database is distinct from the *installed* packages database).

On Wed, 2008-10-01 at 08:58 +0100, Malcolm Wallace wrote:
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list
cabal update #download list of new packages cabal upgrade #make any upgrades
I never knew there was a 'cabal update' command, and it worries me. In my unhappy experience of packaging systems (apt/Aptitude, fink/ FinkCommander, and DarwinPorts/MacPorts) it was never obvious when it should be necessary to run the update. Indeed, the advice given by each of these tools IIRC was to update every time you used it, before doing anything else. (So why was it a manual task then?)
Because we actually consult the index of available packages more often than you think. Every time you cabal install in a local directory we make sure all the required packages are available and consistent. If we had to go to the network every time you would not be happy. There should be a solution here that lets us update more automatically while still allowing people to do offline operations. I'm not sure what that solution is yet though.
On the other hand, every one of those tools eventually failed for me on the update step, leaving me with an inconsistent and non-working configuration.
You will be glad to know that cabal's update is atomic (as of cabal-install-0.5.2). It downloads the new index and atomically replaces the old. So if the download is corrupted it should fail to gunzip and we would not overwrite the old index. Duncan

On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts
Because we actually consult the index of available packages more often than you think. Every time you cabal install in a local directory we make sure all the required packages are available and consistent. If we had to go to the network every time you would not be happy.
There should be a solution here that lets us update more automatically while still allowing people to do offline operations. I'm not sure what that solution is yet though.
The solution seems obvious to me, actually: Check the timestamp of the package file at every access. If it's older than some configurable value, and you have network access, start updating it.

"Svein Ove Aas"
On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts
Because we actually consult the index of available packages more often than you think. Every time you cabal install in a local directory we make sure all the required packages are available and consistent. If we had to go to the network every time you would not be happy.
There should be a solution here that lets us update more automatically while still allowing people to do offline operations. I'm not sure what that solution is yet though.
The solution seems obvious to me, actually:
Check the timestamp of the package file at every access. If it's older than some configurable value, and you have network access, start updating it.
Additionally, you could use rsync instead of a tbz download to speed things up. Gentoo does this right. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.

On Wed, Oct 1, 2008 at 8:59 PM, Achim Schneider
Additionally, you could use rsync instead of a tbz download to speed things up. Gentoo does this right.
It wouldn't be *that* much faster, and the server load would be higher. The current package index is.. what, half a megabyte? It's something to consider in the future, although a change-aware "filesystem" (git, say? It's fast) would probably be better.

On Wed, Oct 1, 2008 at 9:56 PM, Stefan Monnier
It's something to consider in the future, although a change-aware "filesystem" (git, say? It's fast) would probably be better. ^^^
You misspelled "darcs".
I know how git would improve on darcs here: It's (much) faster, and uses less space. How would darcs improve on git?

On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote:
On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts
Because we actually consult the index of available packages more often than you think. Every time you cabal install in a local directory we make sure all the required packages are available and consistent. If we had to go to the network every time you would not be happy.
There should be a solution here that lets us update more automatically while still allowing people to do offline operations. I'm not sure what that solution is yet though.
The solution seems obvious to me, actually:
Check the timestamp of the package file at every access. If it's older than some configurable value,
Yes, that's the interim solution we're suggesting in the ticket, though warning rather than actually blocking and going to the network.
and you have network access, start updating it.
That's hard. Detecting if we would be able to make a network connection without actually doing it is not something I know how to do (esp in a portable way). We would very much appreciate some help in this area. Duncan

On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts
and you have network access, start updating it.
That's hard. Detecting if we would be able to make a network connection without actually doing it is not something I know how to do (esp in a portable way). We would very much appreciate some help in this area.
Duncan
Well, i wouldn't try to detect it. If someone has some auto-update interval specified, it would be sensible enough to try the update automatically imho. Or, if the package server would responds to ICMP echo requests (seems like it doesn't), this seems as a cheap-enough way to test whether it should try to update. Or how about http/1.1 if-modified-since header field ?

On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts
On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote:
and you have network access, start updating it.
That's hard. Detecting if we would be able to make a network connection without actually doing it is not something I know how to do (esp in a portable way). We would very much appreciate some help in this area.
OS X has a function to test that, and a way to get notified when the access state changes; it never occurred to me that other OSs might not. It only tests for local connectivity, though. That aside, why not start downloading in the background, while it's doing whatever you started cabal for? Assuming the network is working, you should have an updated package list by the time it's done; granted, it won't be used for *that* invocation, but next time you invoke cabal it will. If the download fails, just ignore it.

On Thu, Oct 2, 2008 at 00:00, Svein Ove Aas
That aside, why not start downloading in the background, while it's doing whatever you started cabal for? Assuming the network is working, you should have an updated package list by the time it's done; granted, it won't be used for *that* invocation, but next time you invoke cabal it will. If the download fails, just ignore it.
Personally I don't like the idea: If we know that there is newer package list, why not use it? It feels somewhat unintuitive to me. All best Christophe Skrzętnicki

On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts
On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
A reminder:
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list
cabal update #download list of new packages cabal upgrade #make any upgrades
Note that 'cabal upgrade' upgrades everything you've currently got installed (which in general is not necessarily possible).
The standard workflow is just:
cabal update #download list of new packages cabal install yi #install latest version of yi
$ cabal install yi Resolving dependencies... 'yi-0.4.6.2' is cached. Configuring yi-0.4.6.2... cabal: alex version >=2.0.1 && <3 is required but it could not be found. cabal: Error: some packages failed to install: yi-0.4.6.2 failed during the configure step. The exception was: exit: ExitFailure 1 $ cabal install yi-gtk Resolving dependencies... cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11 There is no available version of sourceview that satisfies >=0.9.11 Trying cabal upgrade didn't fix it - it still throws the same error. martin

On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello
$ cabal install yi Resolving dependencies... 'yi-0.4.6.2' is cached. Configuring yi-0.4.6.2... cabal: alex version >=2.0.1 && <3 is required but it could not be found. cabal: Error: some packages failed to install: yi-0.4.6.2 failed during the configure step. The exception was: exit: ExitFailure 1
$ cabal install yi-gtk Resolving dependencies... cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11 There is no available version of sourceview that satisfies >=0.9.11
Trying cabal upgrade didn't fix it - it still throws the same error.
This is because the sourceview package is not on hackage - it's legacy, non-cabal code and can be found on http://www.haskell.org/gtk2hs/ You'll have to install it manually, I'm afraid.

On Wed, Oct 1, 2008 at 1:04 PM, Svein Ove Aas
On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello
wrote: $ cabal install yi Resolving dependencies... 'yi-0.4.6.2' is cached. Configuring yi-0.4.6.2... cabal: alex version >=2.0.1 && <3 is required but it could not be found. cabal: Error: some packages failed to install: yi-0.4.6.2 failed during the configure step. The exception was: exit: ExitFailure 1
$ cabal install yi-gtk Resolving dependencies... cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11 There is no available version of sourceview that satisfies >=0.9.11
Trying cabal upgrade didn't fix it - it still throws the same error.
This is because the sourceview package is not on hackage - it's legacy, non-cabal code and can be found on http://www.haskell.org/gtk2hs/
You'll have to install it manually, I'm afraid.
It's not just yi-gtk, though - yi itself isn't installing via cabal, due to the alex version >=2.0.1 && <3 dependency. martin

On 2008.10.01 12:52:47 -0700, Martin DeMello
On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts
wrote: On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
A reminder:
When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package list
cabal update #download list of new packages cabal upgrade #make any upgrades
Note that 'cabal upgrade' upgrades everything you've currently got installed (which in general is not necessarily possible).
The standard workflow is just:
cabal update #download list of new packages cabal install yi #install latest version of yi
$ cabal install yi Resolving dependencies... 'yi-0.4.6.2' is cached. Configuring yi-0.4.6.2... cabal: alex version >=2.0.1 && <3 is required but it could not be found. cabal: Error: some packages failed to install: yi-0.4.6.2 failed during the configure step. The exception was: exit: ExitFailure 1
$ cabal install yi-gtk Resolving dependencies... cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11 There is no available version of sourceview that satisfies >=0.9.11
Trying cabal upgrade didn't fix it - it still throws the same error.
martin
Yi fails on Alex because Cabal doesn't track executables, nor executables needed for installation. You want 'cabal install alex yi'; I believe the FAQ covers this. As for cabal install yi-gtk, unless things have changed since I last looked, the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 0.3 and below - it's obsolete, in other words. Yi depends directly on vty (which cabal install will handle) and GTK2HS, which unfortunately is not on Hackage and so you or your distro has to handle that. -- gwern beef Croatian Waco, Mace H

On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen
Yi fails on Alex because Cabal doesn't track executables, nor executables needed for installation. You want 'cabal install alex yi';
Yay, that finally worked :) Had to add ~/.cabal/bin to my path first, which wasn't hard to figure out but should probably also be in a faq somewhere.
I believe the FAQ covers this.
Nope. I was following http://www.haskell.org/haskellwiki/Yi when I got stuck, and the page makes no mention of how to resolve the alex dependency
As for cabal install yi-gtk, unless things have changed since I last looked, the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 0.3 and below - it's obsolete, in other words. Yi depends directly on vty (which cabal install will handle) and GTK2HS, which unfortunately is not on Hackage and so you or your distro has to handle that.
Okay, thanks :) martin

On 2008.10.01 13:24:55 -0700, Martin DeMello
On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen
wrote: Yi fails on Alex because Cabal doesn't track executables, nor executables needed for installation. You want 'cabal install alex yi';
Yay, that finally worked :) Had to add ~/.cabal/bin to my path first, which wasn't hard to figure out but should probably also be in a faq somewhere.
The exact issue of where to install executables is somewhat tricky; adding ~/.cabal/bin is one option, but you could've used --prefix=/home/martin/ or you could've used the symlink option in ~/.cabal/config or... There's not really a Cabal-install FAQ for that because there's no clear answer.
I believe the FAQ covers this.
Nope. I was following http://www.haskell.org/haskellwiki/Yi when I got stuck, and the page makes no mention of how to resolve the alex dependency
As for cabal install yi-gtk, unless things have changed since I last looked, the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 0.3 and below - it's obsolete, in other words. Yi depends directly on vty (which cabal install will handle) and GTK2HS, which unfortunately is not on Hackage and so you or your distro has to handle that.
Okay, thanks :)
martin
I've added those 2 questions to the installation section. They've come up so often I was sure they were already there. -- gwern monarchist DCJFTF EADA SASSTIXS Kamumaruha Waihopai phones Colonel IA wideband
participants (12)
-
Achim Schneider
-
Brandon S. Allbery KF8NH
-
Cetin Sert
-
Duncan Coutts
-
Gwern Branwen
-
Krzysztof Skrzętnicki
-
Malcolm Wallace
-
Martin DeMello
-
Stefan Monnier
-
Stephane Bortzmeyer
-
Svein Ove Aas
-
wman