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

Closed
swsch opened this Issue May 4, 2014 · 11 comments

Comments

Projects
None yet
3 participants

swsch commented May 4, 2014

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.

Contributor

rdicosmo commented May 5, 2014

The external solver only does what opam requests it to do:
if you get unwanted downgrades, then probably the default
preferences used are not adapted in this specific case
(see http://opam.ocaml.org/doc/Specifying_Solver_Preferences.html)

To understand what is wrong, here are a few things to do:

  • post the cudf file obtained by passing the --cudf=downgrade
    option to opam (downgrade is just the file name)

  • try again passing the following option to the command line
    and see if the problem goes away

    --criteria="-notuptodate(request),-count(down),-count(changed)"

  • the preferences hard-coded in opam changed over time: you can
    see them by looking at the value reported by opam --help for
    the --criteria option

  • look at the opam version you get by

    opam --git-version

On Sun, May 04, 2014 at 01:31:22PM -0700, Stefan Schmiedl wrote:

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.


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

swsch commented May 5, 2014

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.

Contributor

rdicosmo commented May 5, 2014

Dear Stefan,
you are very welcome. For ocamlbrew, I believe @avsm is the
one that can answer...

If you post the cudf file produced with the --cudf option, I'll be
able to see what exactly is going on.

On Mon, May 05, 2014 at 02:14:43AM -0700, Stefan Schmiedl wrote:

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.


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

swsch commented May 5, 2014

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.

Contributor

rdicosmo commented May 5, 2014

Happy to hear this!
I'd be nontheless interested in getting the cudf produced by opam 1.1.1
and the cudf produced by the opam that works for you, so we can spot
the reason, and document it here

Roberto

On Mon, May 05, 2014 at 03:00:09AM -0700, Stefan Schmiedl wrote:

Current git opam does not show this behavior, it went away somewhere between
1.1.1 and ecadfff. 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.


Reply to this email directly or view it on GitHub.*

Owner

avsm commented May 5, 2014

Not sure about ocamlbrew, but with hom brew it's "brew install opam --HEAD". But beware, as trunk is buggy at present.

On 5 May 2014, at 10:21, Roberto Di Cosmo notifications@github.com wrote:

Dear Stefan,
you are very welcome. For ocamlbrew, I believe @avsm is the
one that can answer...

If you post the cudf file produced with the --cudf option, I'll be
able to see what exactly is going on.

On Mon, May 05, 2014 at 02:14:43AM -0700, Stefan Schmiedl wrote:

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.


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

Reply to this email directly or view it on GitHub.

swsch commented May 5, 2014

Roberto Di Cosmo (05.05. 03:08):

Happy to hear this!
I'd be nontheless interested in getting the cudf produced by opam 1.1.1
and the cudf produced by the opam that works for you, so we can spot
the reason, and document it here

I'm attaching stable-1.cudf from last night, written by opam 1.1.1
and git-1.cudf from today, written by ecadfff.

Thanks,
s.

Roberto

On Mon, May 05, 2014 at 03:00:09AM -0700, Stefan Schmiedl wrote:

Current git opam does not show this behavior, it went away somewhere between
1.1.1 and ecadfff. 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.


Reply to this email directly or view it on GitHub.*


Reply to this email directly or view it on GitHub:
#1374 (comment)

Contributor

rdicosmo commented May 5, 2014

Didn't find the attachments...

On Mon, May 05, 2014 at 04:02:31AM -0700, Stefan Schmiedl wrote:

Roberto Di Cosmo (05.05. 03:08):

Happy to hear this!
I'd be nontheless interested in getting the cudf produced by opam 1.1.1
and the cudf produced by the opam that works for you, so we can spot
the reason, and document it here

I'm attaching stable-1.cudf from last night, written by opam 1.1.1
and git-1.cudf from today, written by ecadfff.

Thanks,
s.

Roberto

On Mon, May 05, 2014 at 03:00:09AM -0700, Stefan Schmiedl wrote:

Current git opam does not show this behavior, it went away somewhere
between
1.1.1 and ecadfff. 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.


Reply to this email directly or view it on GitHub.*


Reply to this email directly or view it on GitHub:
#1374 (comment)


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

swsch commented May 5, 2014

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

s.

Contributor

rdicosmo commented May 5, 2014

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 May 5, 2014

swsch commented May 6, 2014

Roberto Di Cosmo (05.05. 10:16):

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.

Agreed.

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 :-)

From my point of view, it was an even bet between opam and solver,
and since I already knew where opam issues could be filed ...

Thanks again for helping, much appreciated.
s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment