[commit: packages/Cabal] ghc-head: Use soft constraints for add-source deps in sandboxInstallPolicy. (5940edb)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:26:56 CEST 2013


Repository : ssh://git@git.haskell.org/Cabal

On branch  : ghc-head
Link       : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=5940edbb43d2f96173d926c1ffaada1233213b15

>---------------------------------------------------------------

commit 5940edbb43d2f96173d926c1ffaada1233213b15
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Thu Jun 6 20:42:04 2013 +0200

    Use soft constraints for add-source deps in sandboxInstallPolicy.
    
    See #1362. This is an experimental change.


>---------------------------------------------------------------

5940edbb43d2f96173d926c1ffaada1233213b15
 cabal-install/Distribution/Client/Dependency.hs |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Distribution/Client/Dependency.hs b/cabal-install/Distribution/Client/Dependency.hs
index 36d3fa1..97c96ff 100644
--- a/cabal-install/Distribution/Client/Dependency.hs
+++ b/cabal-install/Distribution/Client/Dependency.hs
@@ -333,9 +333,13 @@ applySandboxInstallPolicy
 
   . addTargets installedNotModified
 
+  . addPreferences
+      [ PackageVersionPreference (packageName pkg)
+        (thisVersion (packageVersion pkg)) | pkg <- otherDeps ]
+
   . addConstraints
       [ PackageConstraintVersion (packageName pkg)
-        (thisVersion (packageVersion pkg)) | pkg <- modifiedDeps ++ otherDeps ]
+        (thisVersion (packageVersion pkg)) | pkg <- modifiedDeps ]
 
   . addTargets [ packageName pkg | pkg <- modifiedDeps ]
 





More information about the ghc-commits mailing list