Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if the sandbox should ignore the user package DB #1183

Closed
tibbe opened this issue Jan 15, 2013 · 5 comments
Closed

Investigate if the sandbox should ignore the user package DB #1183

tibbe opened this issue Jan 15, 2013 · 5 comments
Assignees

Comments

@tibbe
Copy link
Member

tibbe commented Jan 15, 2013

After trying out the current sandbox support in HEAD I found that I first had to delete my whole user package DB, as the sandboxing support wouldn't install any packages in my sandbox otherwise. We should consider not using the user package DB when using sandboxing, to actually have package be installed into the sandbox.

@ghost ghost assigned 23Skidoo Jan 15, 2013
@23Skidoo
Copy link
Member

This sounds like a bug. Can you explain in more detail what you did?

@tibbe
Copy link
Member Author

tibbe commented Jan 15, 2013

  1. I had an existing user package DB, containing packages like criterion.
  2. I created a new sandbox using cabal sandbox-init.
  3. I changed to the sandbox dir and ran cabal sandbox-install --only-dependencies, in hope that this would reinstall all the deps (e.g. criterion) that were in the user package DB.
  4. Actual result: nothing new was installed.

@23Skidoo
Copy link
Member

Thanks, will look into it.

@23Skidoo
Copy link
Member

We're probably using mappend somewhere instead of overriding.

@23Skidoo
Copy link
Member

This was caused by 7b2e363. Setting configUserInstall to True made interpretPackageDbFlags add UserPackageDB to the default package DB stack.

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 24, 2013
In sandbox mode userInstallDirs = globalInstallDirs and we set userInstall to
False to prevent UserPackageDB from being added to the package DB stack (see haskell#1183).
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 24, 2013
We use userInstallDirs in sandbox mode to prevent cabal-install from doing
unnecessary things like invoking itself via 'sudo' (see commit
7b2e363 and 'rootCmd' in D.C.Install), but in
this particular case we want userInstall to be False to prevent UserPackageDB
from being added to the package DB stack (see haskell#1183 and interpretPackageDbFlags
in D.S.Configure).
23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 24, 2013
We use userInstallDirs in sandbox mode to prevent cabal-install from doing
unnecessary things like invoking itself via 'sudo' (see commit
7b2e363 and 'rootCmd' in D.C.Install), but in
this particular case we want userInstall to be False to prevent UserPackageDB
from being added to the package DB stack (see haskell#1183 and interpretPackageDbFlags
in D.S.Configure).
23Skidoo added a commit that referenced this issue Apr 12, 2013
We use userInstallDirs in sandbox mode to prevent cabal-install from doing
unnecessary things like invoking itself via 'sudo' (see commit
7b2e363 and 'rootCmd' in D.C.Install), but in
this particular case we want userInstall to be False to prevent UserPackageDB
from being added to the package DB stack (see #1183 and interpretPackageDbFlags
in D.S.Configure).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants