PSA: `cabal update` command needs manual unsticking

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PSA: `cabal update` command needs manual unsticking

Gershom Bazerman
Dear Haskellers,

A recent update to hackage, which fixed up the 01-index.tar.gz file,
revealed a bug in existing versions of cabal-install, when index files
are cleaned up. This bug means that the `cabal update` command, which
updates the hackage index file, will fail silently and leave the old
file in place. It is easy to get things working again, but it requires
manual intervention. Here is the most straightforward way to get
things working again:

On gnu/linux or mac: rm ~/.cabal/packages/hackage.haskell.org/01-index.*
On windows: remove the same files, but from
%appdata%\cabal\packages\hackage.haskell.org

rerun `cabal update` to fetch a new 01-index.

Apologies all for the inconvenience and any confusion this may have
caused. There is a PR to fix this behavior in the works, but since the
problem is on the client side, the fix will only improve the
situations for new versions of `cabal`.

Happy New Years to all, and cheers to a very functional 2018,
Gershom

p.s.: since the problem comes in unpacking the 01-index.tar.gz into
the 01-index.tar, you can also just untar that file in place manually,
or force cabal into doing the same by running `touch
~/.cabal/packages/hackage.haskell.org/01-index.tar`
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: PSA: `cabal update` command needs manual unsticking

Sven Panne-2
2018-01-02 2:24 GMT+01:00 Gershom B <[hidden email]>:
A recent update to hackage, which fixed up the 01-index.tar.gz file,
revealed a bug in existing versions of cabal-install, when index files
are cleaned up. This bug means that the `cabal update` command, which
updates the hackage index file, will fail silently and leave the old
file in place. It is easy to get things working again, but it requires
manual intervention. [...]

Quick question: Are stack users affected, too, or only cabal users? I'm just asking because as a stack user you have ~/.stack/indices/Hackage/01-index.* files lying around, too...

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell-cafe] PSA: `cabal update` command needs manual unsticking

Brandon Allbery
In reply to this post by Gershom Bazerman
Correct: cabal-install 1.x still uses the old index format (00-index). The logic is different for 01-index, in order to support incremental update (appending when possible, instead of always having to download the whole thing again like with 00-index).

On Thu, Jan 4, 2018 at 1:38 PM, Nathan Collins <[hidden email]> wrote:
In case this confuses anyone else, I think this PSA only applies if
you're using cabal-install version 2.*, but please correct me if I'm
wrong.

I had some ~/.cabal/packages/hackage.haskell.org/00-index.* files, but
not any 01-index.* files, and running `cabal update` didn't change
that. Then I noticed I was using cabal-install version 1.24.0.2. When
I upgraded to cabal-install version 2.0.0.1 and did another `cabal
update` the 01-index.* files appeared.

Cheers,

-nathan

On Mon, Jan 1, 2018 at 5:24 PM, Gershom B <[hidden email]> wrote:
> Dear Haskellers,
>
> A recent update to hackage, which fixed up the 01-index.tar.gz file,
> revealed a bug in existing versions of cabal-install, when index files
> are cleaned up. This bug means that the `cabal update` command, which
> updates the hackage index file, will fail silently and leave the old
> file in place. It is easy to get things working again, but it requires
> manual intervention. Here is the most straightforward way to get
> things working again:
>
> On gnu/linux or mac: rm ~/.cabal/packages/hackage.haskell.org/01-index.*
> On windows: remove the same files, but from
> %appdata%\cabal\packages\hackage.haskell.org
>
> rerun `cabal update` to fetch a new 01-index.
>
> Apologies all for the inconvenience and any confusion this may have
> caused. There is a PR to fix this behavior in the works, but since the
> problem is on the client side, the fix will only improve the
> situations for new versions of `cabal`.
>
> Happy New Years to all, and cheers to a very functional 2018,
> Gershom
>
> p.s.: since the problem comes in unpacking the 01-index.tar.gz into
> the 01-index.tar, you can also just untar that file in place manually,
> or force cabal into doing the same by running `touch
> ~/.cabal/packages/<a href="http://hackage.haskell.org/01-index.tar`" rel="noreferrer" target="_blank">hackage.haskell.org/01-index.tar`
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: [Haskell-cafe] PSA: `cabal update` command needs manual unsticking

Carter Schonwald
My cabal v2 seemed to be using 00 indices.  Much to my confusion.  Maybe I should reinstall it and check my config ;)

On Thu, Jan 4, 2018 at 5:25 PM Brandon Allbery <[hidden email]> wrote:
Correct: cabal-install 1.x still uses the old index format (00-index). The logic is different for 01-index, in order to support incremental update (appending when possible, instead of always having to download the whole thing again like with 00-index).

On Thu, Jan 4, 2018 at 1:38 PM, Nathan Collins <[hidden email]> wrote:
In case this confuses anyone else, I think this PSA only applies if
you're using cabal-install version 2.*, but please correct me if I'm
wrong.

I had some ~/.cabal/packages/hackage.haskell.org/00-index.* files, but
not any 01-index.* files, and running `cabal update` didn't change
that. Then I noticed I was using cabal-install version 1.24.0.2. When
I upgraded to cabal-install version 2.0.0.1 and did another `cabal
update` the 01-index.* files appeared.

Cheers,

-nathan

On Mon, Jan 1, 2018 at 5:24 PM, Gershom B <[hidden email]> wrote:
> Dear Haskellers,
>
> A recent update to hackage, which fixed up the 01-index.tar.gz file,
> revealed a bug in existing versions of cabal-install, when index files
> are cleaned up. This bug means that the `cabal update` command, which
> updates the hackage index file, will fail silently and leave the old
> file in place. It is easy to get things working again, but it requires
> manual intervention. Here is the most straightforward way to get
> things working again:
>
> On gnu/linux or mac: rm ~/.cabal/packages/hackage.haskell.org/01-index.*
> On windows: remove the same files, but from
> %appdata%\cabal\packages\hackage.haskell.org
>
> rerun `cabal update` to fetch a new 01-index.
>
> Apologies all for the inconvenience and any confusion this may have
> caused. There is a PR to fix this behavior in the works, but since the
> problem is on the client side, the fix will only improve the
> situations for new versions of `cabal`.
>
> Happy New Years to all, and cheers to a very functional 2018,
> Gershom
>
> p.s.: since the problem comes in unpacking the 01-index.tar.gz into
> the 01-index.tar, you can also just untar that file in place manually,
> or force cabal into doing the same by running `touch
> ~/.cabal/packages/hackage.haskell.org/01-index.tar`
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: PSA: `cabal update` command needs manual unsticking

Donn Cave-4
In reply to this post by Gershom Bazerman
Quoth Nathan Collins <[hidden email]>,

> I had some ~/.cabal/packages/hackage.haskell.org/00-index.* files, but
> not any 01-index.* files, and running `cabal update` didn't change
> that.

I see this when using hackage.fpcomplete.com, rather than hackage.haskell.org.

(The latter is very slow for me, and sometimes fails -
  $ cabal update
  Downloading the latest package list from hackage.haskell.org
  dieVerbatim: user error (cabal: '/bin/curl' exited with an error:
  curl: (18) transfer closed with 29508193 bytes remaining to read
  )$
)

        Donn
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users