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

opam repair #181

Closed
lefessan opened this issue Sep 20, 2012 · 4 comments
Closed

opam repair #181

lefessan opened this issue Sep 20, 2012 · 4 comments

Comments

@lefessan
Copy link
Contributor

It would be nice to have a command 'opam repair' that would repair a broken installation, so that the configuration is ok (it would verify the consistency of the installed packages, and remove any of them whose dependencies are not correctly met, and create configuration files for the current version)

@AltGr
Copy link
Member

AltGr commented Mar 6, 2014

Not sure if this is really needed anymore:

  • if there is a problem with the consistency of the universe (dependencies missing...), opam upgrade should normally do the trick. (The users can't be expected to guess that, but opam upgrade --criteria="-changed" should fix but actually not upgrade anything).
  • A completely different issue, if there are bugs within OPAM internal files, I can't see a worthwile way of automatically repairing. opam switch export and recreate with opam switch import in a clean environment are your best way out.
  • If there is an inconsistency between the OPAM universe and what is actually installed (manual installations or ocamlfind removes, use of opam --fake), not much we can do at the moment since we don't track installed files. Clean root and import/export are your best friends, unless you know the culprit and can opam reinstall it.

So is it worth making a shortcut for a full clean switch reinstall ?
We should also be much less likely to encounter such problems now that OPAM is more stable.

@rdicosmo
Copy link
Contributor

rdicosmo commented Mar 7, 2014

@AltGr you can add the first remark to the documentation about setting solver preferences...

@AltGr
Copy link
Member

AltGr commented Mar 7, 2014

Good suggestion, done :)

@AltGr
Copy link
Member

AltGr commented Jun 27, 2014

Implemented as opam upgrade --fixup

@AltGr AltGr closed this as completed Jun 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants