As some of you may know, I’m trying to make ‘cabal install’ verify OpenPGP signatures that come from Hackage. I modified ‘updatePackageIndexCacheFile’ to ask whether a certain OpenPGP public key should be trusted, but I later discovered that the mentioned function is called twice during ‘cabal update’*, which means that all questions are also asked twice.
I believe this doesn’t affect #1443 anymore. If so, please apply the attached patch. * ‘update’ uses ‘updateRepo’ and ‘checkForSelfUpgrade’. The former runs ‘updatePackageIndexCacheFile’ via ‘updateRepoIndexCache’. The latter calls ‘updatePackageIndexCacheFile’ via a sequence of calls from ‘getSourcePackages’ to ‘getSourcePackages’’ to ‘readRepoIndex’ to ‘whenCacheOutOfDate’.
From 53f58691303721928cd49baf1396284a8d6340c2 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov <nik...@karetnikov.org> Date: Fri, 25 Jul 2014 15:47:32 +0400 Subject: [PATCH] Change 'whenCacheOutOfDate' to use '>' again. --- cabal-install/Distribution/Client/IndexUtils.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal-install/Distribution/Client/IndexUtils.hs b/cabal-install/Distribution/Client/IndexUtils.hs index 0fc1927..51cae2e 100644 --- a/cabal-install/Distribution/Client/IndexUtils.hs +++ b/cabal-install/Distribution/Client/IndexUtils.hs @@ -242,7 +242,7 @@ whenCacheOutOfDate origFile cacheFile action = do else do origTime <- getModTime origFile cacheTime <- getModTime cacheFile - when (origTime >= cacheTime) action + when (origTime > cacheTime) action ------------------------------------------------------------------------ -- Reading the index file -- 1.7.9.5
pgplMHeCRxwAs.pgp
Description: PGP signature
_______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel