Comments (1)
As I tests this patch I keep finding nuances. In windows the packages in the sandbox are registered with lowercase drive letters "c:...", but my patched userPkgs expects the drive letter to be in upper case "C:...". In linux, I discovered that when cabal-dev takes a relative path for specifying the sandbox containing ".." when installing packages, causes the paths in the package info to also contain "..".
For the reasons above I have found simpler to just redefine userPkgs to:
userPkgs :: IO (PkgInfo -> Bool)
userPkgs = do
gDB <- getGlobalPkgDB
return$ \pkgi -> isNothing$ lookupInstalledPackageId gDB (installedPackageId pkgi)
getGlobalPkgDB :: IO PkgDB
getGlobalPkgDB = do
(_,pro) <- configure normal Nothing Nothing defaultProgramDb
getInstalledPackages normal [GlobalPackageDB] pro
So now, everything which is not in the global package database is accepted by userPkgs, the above problems are solved, and also the pesky "." at the end of the path in unices.
from cab.
Related Issues (20)
- support "--reinstall" option HOT 1
- A bug in `cab outdated` HOT 1
- Update build-depends in .cabal by current modules
- a problem in 'cab uninstall' HOT 3
- cab outdated shows smaller sign for greater packages HOT 6
- cab delete -r: Prelude.(!!): index too large HOT 2
- bug when built with ghc 7.21 HOT 4
- Parsing invalid version numbers fails with `read: no parse`
- cab outdated shows packages ahead of Hackage version HOT 1
- Remove executables with cab uninstall HOT 2
- cab get command/alias HOT 2
- Fails to install HOT 2
- Should use -threaded always? HOT 1
- `cab ghci` can't choose sandboxed packages correctly
- bug when built with ghc 7.21
- cab uninstall deletes all MinGW libraries HOT 4
- cab-0.2.19: Ambiguous occurrence ‘unPackageName’ HOT 3
- Pattern match(es) are non-exhaustive HOT 2
- Request: cab ghci HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cab.