From bfeb01f2ffd72a38c647d20a051e6a82fdb014c4 Mon Sep 17 00:00:00 2001
From: Duncan Coutts <duncan@community.haskell.org>
Date: Sun, 8 Mar 2015 10:42:39 +0000
Subject: [PATCH] Drop /packages/archive from default remote repo URL

Instead of the old http://hackage.haskell.org/packages/archive
we can just use http://hackage.haskell.org/ and avoid doing
an http redirect. The old one continues to work of course.
---
 cabal-install/Distribution/Client/Config.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Distribution/Client/Config.hs b/cabal-install/Distribution/Client/Config.hs
index f6245a2e2f..4d40dc0083 100644
--- a/cabal-install/Distribution/Client/Config.hs
+++ b/cabal-install/Distribution/Client/Config.hs
@@ -487,7 +487,11 @@ defaultRemoteRepo :: RemoteRepo
 defaultRemoteRepo = RemoteRepo name uri
   where
     name = "hackage.haskell.org"
-    uri  = URI "http:" (Just (URIAuth "" name "")) "/packages/archive" "" ""
+    uri  = URI "http:" (Just (URIAuth "" name "")) "/" "" ""
+    -- Note that lots of old ~/.cabal/config files will have the old url
+    -- http://hackage.haskell.org/packages/archive
+    -- but new config files can use the new url (without the /packages/archive)
+    -- and avoid having to do a http redirect
 
 --
 -- * Config file reading
-- 
GitLab