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

install only what is requested, without extra actions #2597

Closed
maroneze opened this issue Jul 1, 2016 · 2 comments
Closed

install only what is requested, without extra actions #2597

maroneze opened this issue Jul 1, 2016 · 2 comments

Comments

@maroneze
Copy link
Contributor

maroneze commented Jul 1, 2016

After running an opam update in the past, OPAM wanted to upgrade some of my packages, but I wanted to keep they unchanged, so I just refused to do an opam upgrade.

Now, I'm trying to install a specific package which has nothing to do with that one, but if I try to simply opam install mypackage, OPAM remembers some operations from the update, so it also wants to do them, as in the example below (in which I tried simply opam install frama-c-base):

The following actions will be performed:
  ∗  install   frama-c-base 20160501*     
  ↗  upgrade   coq          8.4.6 to 8.5.1
  ↻  recompile why3-base    0.87.0            [uses coq]
  ↻  recompile why3         0.87.0            [uses why3-base]

In this specific case, I can opam pin add coq -k version 8.4.6 and prevent the rest from happening, but in the general case it can be more complicated. Sometimes I just want to quickly install a specific package without doing anything else.

Ideally, a command-line option to opam install (such as --only) would be best, but otherwise, being able to erase OPAM's update cache might also work, if it's possible.

@AltGr
Copy link
Member

AltGr commented Jul 2, 2016

Opam doesn't remember the updates, but it tries to keep packages related to your request up to date; however, this does not seem to be the case here.
Did you install an external solver, e.g. apt-get install aspcud ?
In general, a good way to prevent extra actions is to specify --criteria=paranoid (or --criteria=-changed,-notuptodate), to tell the solver to do the minimal changes that may satisfy your request. See this part of the doc for more details.

@AltGr AltGr closed this as completed Jul 2, 2016
@maroneze
Copy link
Contributor Author

maroneze commented Jul 4, 2016

Thank you, indeed it was the case (I'm using aspcud). --criteria=paranoid is exactly what I was looking for.

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