Skip to content

sandbox-build sometimes suggests a nonexistent flag #1229

Closed
bmillwood opened this Issue Mar 5, 2013 · 7 comments

2 participants

@bmillwood
[ben@euler ~/haskell/cabal/cabal-install]$ ./dist/build/cabal/cabal sandbox-build
Resolving dependencies...
In order, the following would be installed:
Cabal-1.17.0 (reinstall)
cabal: The following packages are likely to be broken by the reinstalls:
cabal-install-1.17.0
Use --force-reinstalls if you want to install anyway.

[ben@euler ~/haskell/cabal/cabal-install]$ ./dist/build/cabal/cabal sandbox-build --force-reinstalls
cabal: unrecognized option `--force-reinstalls'
@23Skidoo 23Skidoo was assigned Mar 5, 2013
@23Skidoo
Haskell member
23Skidoo commented Mar 5, 2013

I guess that for some reason reverse dependencies are not being reinstalled.

@bmillwood

Well, I wouldn't expect them to be, since I'm using sandbox-build and not sandbox-install. The problem is that the printed messages are unhelpful.

@23Skidoo
Haskell member
23Skidoo commented Mar 5, 2013

sandbox-build runs install under the hood to automatically update add-source dependencies.

@23Skidoo
Haskell member

This is caused by my hack for reinstalling reverse dependencies. Since there is no --reinstall-revdeps flag for install, we do install sandboxed-package add-source-dep-1 ... add-source-dep-N and then prune the sandboxed package from the instal plan. Which fails when the sandboxed package is itself a reverse dependency of one of the packages we're reinstalling.

I can "solve" this by not pruning the sandboxed package from the install plan when it is itself installed in the sandbox package db (this will still fail if there's a reverse dependency we've missed). A proper solution is to implement install --reinstall-revdeps.

@23Skidoo
Haskell member

Filed #1298 for install --reinstall-revdeps.

@23Skidoo
Haskell member

We had a long IRC discussion with @kosmikus and @dcoutts during which we agreed to try to solve this by using the solver to make an install plan for the whole sandbox environment. The idea is:

  • Given is a set of package names (a union of installed packages in the sandbox package DB + add-source packages)
  • We constrain the modified add-source deps to be reinstalled; for all others the solver is free to either pick the installed version or reinstall.
  • The solver then tries to produce an install plan for us.
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 6, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
dab2103
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 6, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
9d5744f
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 7, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
1679b30
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 8, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
31988ec
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 8, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
9c72a9e
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 11, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
32459d6
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 11, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
6c9a1ca
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 12, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
f55171f
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 13, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
02242c8
@23Skidoo
Haskell member

With b463558, this should be less of a problem.

@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 13, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages in the depResolverInstalledPkgIndex),
constraining the modified add-source deps to be reinstalled and the already
installed packages to be preferably not.

Fixes #1229.
2982014
@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue May 16, 2013
@23Skidoo 23Skidoo Instead of pruning, make an install plan for the whole environment.
Previously, we used a hack for reinstalling reverse dependencies: we created an
install plan for the sandboxed package and the modified add-source deps and then
pruned the sandboxed package from it. This missed those revdeps that the
sandboxed package didn't depend on and also broke the sandboxed package if it
was installed in the sandboxed package DB (see #1229).

This commit replaces that hack with a more principled approach: we create a plan
for the whole environment (all packages installed in the sandbox), constraining
the modified add-source deps to be reinstalled and the already installed
packages to be preferably not.

Fixes #1229.
99dc405
@23Skidoo 23Skidoo closed this in #1315 May 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.