Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

"opam install" wants to downgrade unrelated packages after "opam upgrade" #1374

Closed
swsch opened this Issue · 11 comments

3 participants

@swsch

About an hour ago, I ran opam update followed by opam upgrade. Shortly after I tried opam install freetds and was informed that a downgrade/recompile of other packages was planned by the solver at irill.org.

 - install freetds.0.5.1
 - downgrade react.0.9.4 to 0.9.3 [required by utop]
 - recompile lwt.2.4.4 [use react]
 - recompile zed.1.3 [use react]
 - recompile conduit.0.5.0 [use react]
 - recompile cstruct.1.1.0 [use react]
 - recompile ezjsonm.0.2.0 [use react]
 - recompile js_of_ocaml.1.4.0 [use react]
 - recompile obigstore.0.9.1 [use react]
 - recompile ocsigenserver.2.2.0 [use react]
 - downgrade lambda-term.1.5 to 1.2 [required by utop]
 - recompile cohttp.0.11.2 [use react]
 - recompile cow.0.10.0 [use react]
 - recompile eliom.3.0.3 [use react]
 - downgrade utop.1.11 to 1.4.0

The reason is probably the following line taken from running it again with --debug:

00:00.188  032155  SOLVER                  resolve request=install:(freetds) remove:() upgrade:()
00:00.277  032155  CUDF                    resolve request=install:(freetds) remove:() upgrade:()
00:01.850  032155  CUDF                    graph_of_actions root_actions={  - downgrade lambda-term.216 to 186,  - downgrade react.104 to 103,  - install freetds.63,  - downgrade utop.246 to 210 }

The package can be installed without downgrades by opam install --no-cudf freetds. I also see the same effect with the package for ocamldbi: downgrades with external solver, single package install with built-in solver. opam upgrade after installation reports that everything is uptodate.

Does anybody have an idea what's going on?

Thanks,
s.

@rdicosmo
Owner
@swsch

Hi Roberto, thanks for responding.

opam --version reports 1.1.1, it was installed by ocamlbrew, so the command line option --criteria is not recognized. However, using OPAMCRITERIA="..." makes opam pass along the options to the proxy script, which in turn passes them in the URL http://$SERVER/cudf.bz2?criteria="...". So the remote solver should get to see the criteria.

Using the additional criteria, however, has no effect:

$ OPAMCRITERIA="-notuptodate(request),-count(down),-count(changed)" opam install --debug ocamldbi
...
00:00.097  001915  CLIENT                  INSTALL { ocamldbi }
00:00.124  001915  FILE(.config)           Read ~/ocamlbrew/ocaml-4.01.0/.opam/system/config/global-config.config in 0.000s
00:00.129  001915  FILE(comp)              Read ~/ocamlbrew/ocaml-4.01.0/.opam/compilers/system/system/system.comp in 0.000s
00:00.129  001915  FILE(comp)              Read ~/ocamlbrew/ocaml-4.01.0/.opam/compilers/system/system/system.comp in 0.000s
00:00.129  001915  FILE(comp)              Read ~/ocamlbrew/ocaml-4.01.0/.opam/compilers/system/system/system.comp in 0.000s
00:00.129  001915  FILE(comp)              Read ~/ocamlbrew/ocaml-4.01.0/.opam/compilers/system/system/system.comp in 0.000s
00:00.162  001915  SYSTEM                  [log-1915-4bcc67] (in 0.000s) which aspcud
00:00.193  001915  SOLVER                  resolve request=install:(ocamldbi) remove:() upgrade:()
00:00.281  001915  CUDF                    resolve request=install:(ocamldbi) remove:() upgrade:()
00:02.329  001915  CUDF                    graph_of_actions root_actions={  - downgrade lambda-term.216 to 186,  - downgrade react.104 to 103,  - downgrade utop.246 to 210,  - install ocamldbi.114 }
00:02.333  001915  SOLUTION                apply

Is there an easy and reversible way to plugin a more recent git version of opam into my existing ocamlbrew installation?

Thanks again,
s.

@rdicosmo
Owner
@swsch

Current git opam does not show this behavior, it went away somewhere between 1.1.1 and ecadffffda6fc1031b1c81c47ff6569d954a6102. So I guess my problem can be considered solved.

I can send you the 500k CUDF file from last night, if you're still interested.

Thanks,
s.

@rdicosmo
Owner
@avsm
Owner
@swsch
@rdicosmo
Owner
@swsch

That's what I get for replying by mail ...
Try this and that

s.

@rdicosmo
Owner

Thanks... I checked both cudf files and in both cases the external solver aspcud returns a solution that has no downgrades, and installs only freetds and ocambdi. Hence the problem is not related to the solver, but to some other changes in opam. This would be a good occasion to run git bisect, if one wants to play a bit, but for me the issue is solved.

Let me notice by the way that up to now we did not see a single instance of an issue where the solver is the culprit... that's good to know :-)

@rdicosmo rdicosmo closed this
@swsch
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.