Fix the timestamp shown during cabal update
commit171d5a4bb3b3e031deef5b8f2b84d5a150ec362a
authorAndrea Bedini <andrea@andreabedini.com>
Thu, 27 Jan 2022 13:46:39 +0000 (27 21:46 +0800)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 7 May 2022 18:44:19 +0000 (7 18:44 +0000)
treeb19e80279f3f1bc093a7b26bc6c91392218365dd
parent203d44055184522e33fd549b2f15c90a06f28d27
Fix the timestamp shown during cabal update

Passing an index-state timestamp to cabal update currently makes it
write a message saying the index has been updated to the *previous*
timestamp.

    $ cabal update hackage.haskell.org,2016-09-24T17:47:48Z
    Downloading the latest package list from hackage.haskell.org
    Package list of hackage.haskell.org is up to date at index-state 2022-01-27T12:59:23Z

This is because of a confusion between downloading the index and setting
the index state. These are independent actions.

This patch makes separates the two messages (updating the index and
updating the index-state timestamp) and makes sure the right timestamp
is printed.
cabal-install/src/Distribution/Client/CmdUpdate.hs
changelog.d/pr-7934 [new file with mode: 0644]