ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.24k stars 356 forks source link

Strange ocp-index conflict and opam --fixup wants to remove everything. #1831

Closed dbuenzli closed 9 years ago

dbuenzli commented 10 years ago

Here's the interaction (cudf file is here):

> opam config report 
# OPAM status report
# opam-version    1.2.0
# self-upgrade    no
# os              darwin
# external-solver aspcud
# criteria        -removed,-notuptodate,-changed*
# jobs            1
# repositories    1* (http)
# pinned          9 (version control)
# current-switch  system*
# last-update     2014-10-27 10:55
> opam update
[default] Downloading https://opam.ocaml.org/urls.txt
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...
[dicomm] Fetching /Users/dbuenzli/sync/repos/dicomm
[fut] Fetching /Users/dbuenzli/sync/repos/fut
[merlin] Fetching https://github.com/the-lambda-church/merlin.git
[pkgopkg] Fetching http://erratique.ch/repos/pkgopkg.git
[useri] Fetching /Users/dbuenzli/sync/repos/useri
[webglue] Fetching http://erratique.ch/repos/webglue.git
[xmlm] Fetching https://github.com/dbuenzli/xmlm.git
[WARNING] A conflict was detected in your installation. This can be caused by updated
constraints in your installed packages:
  - No package matches ocp-indent>0.6.1.

You should run "opam upgrade --fixup" to resolve the situation.
> opam upgrade --fixup 
The following actions will be performed:
 - remove    useri.0*
 - remove    utop.1.16
 - remove    merlin.2.0.0*
 - remove    fut.0*
 - remove    vg.0.8.1
 - remove    tgls.0.8.2
 - remove    tsdl.0.8.1
 - remove    lambda-term.1.7
 - remove    yojson.1.1.8
 - remove    ezjsonm.0.2.0
 - remove    js_of_ocaml.2.5
 - remove    ctypes.0.3.3
 - remove    uucp.0.9.0
 - remove    zed.1.3
 - remove    ocp-indent.1.4.2
 - remove    webglue.0*
 - remove    biniou.1.0.9
 - remove    lwt.2.4.5
 - remove    rtime.0.9.3
 - remove    comparelib.109.60.00
 - remove    sexplib.111.25.00
 - remove    jsonm.0.9.1
 - remove    otfm.0.2.0
 - remove    gg.0.9.0
 - remove    omd.1.1.2
 - remove    base-bytes.legacy
 - remove    camomile.0.8.5
 - remove    cmdliner.0.9.5
 - remove    cppo.1.0.1
 - remove    dicomm.0*
 - remove    dumpast.0.1.0
 - remove    easy-format.1.0.2
 - remove    menhir.20140422
 - remove    ocamlgraph.1.8.5
 - remove    ocp-build.1.99.8-beta
 - remove    optcomp.1.6
 - remove    ounit.2.0.0
 - remove    qcheck.0.2
 - remove    re.1.2.2
 - remove    react.1.2.0
 - remove    type_conv.111.13.00
 - remove    uuidm.0.9.5
 - remove    uutf.0.9.3
 - remove    xmlm.1.2.0*
 - remove    ocamlfind.1.5.4
=== ⊘ 45 ===
Do you want to continue ? [Y/n] n
amirmc commented 10 years ago

I noticed a similar issue last night where an opam upgrade cycle wanted to remove everything. Not sure if it's related.

Updates available for 4.01.0, apply them with 'opam upgrade':
=== ↑ 1   ↓ 3   ⊘ 60 ===
AmirMacBook:~ amir$ opam upgrade
The following actions will be performed:
 - remove    tls.0.1.0
 - remove    websocket.0.8.1
 - remove    x509.0.1.0
 - remove    cohttp.0.12.0
 - remove    asn1-combinators.0.1.0
 - remove    conduit.0.6.0
 - remove    nocrypto.0.1.0
 - remove    utop.1.15
 - remove    atdgen.1.4.0
 - remove    merlin.1.7.1
 - remove    cow.1.0.0
 - remove    iocamljs-kernel.0.4.6
 - remove    syndic.1.1
 - remove    ocp-index.1.0.3
 - remove    cstruct.1.4.0
 - remove    lambda-term.1.6
 - remove    yojson.1.1.8
 - remove    ezjsonm.0.2.0
 - remove    js_of_ocaml.2.5
 - remove    oasis.0.4.4
 - remove    ipaddr.2.5.0
 - remove    uri.1.7.2
 - remove    ocamlnet.3.7.6
 - remove    ctypes.0.3.3
 - remove    ocplib-endian.0.7
 - remove    zed.1.3
 - remove    crunch.1.3.0
 - remove    atd.1.1.2
 - remove    biniou.1.0.9
 - remove    lwt.2.4.5
 - remove    dyntype.0.9.0
 - remove    fieldslib.109.20.03
 - remove    ocaml-data-notation.0.0.11
 - remove    sexplib.111.25.00
 - remove    ocp-build.1.99.6-beta*
 - remove    jsonm.0.9.1
 - remove    pcre-ocaml.7.1.1
 - remove    base-bytes.legacy
 - remove    calendar.2.03.2
 - remove    camomile.0.8.5
 - remove    cmdliner.0.9.5
 - remove    cryptokit.1.9
 - remove    easy-format.1.0.2
 - remove    menhir.20140422
 - remove    ocamlify.0.0.1
 - remove    ocamlmod.0.0.7
 - remove    omd.0.9.7*
 - remove    optcomp.1.6
 - remove    ounit.2.0.0
 - remove    re.1.2.2
 - remove    react.1.2.0
 - remove    ssl.0.4.7
 - remove    stringext.1.0.0
 - remove    type_conv.111.13.00
 - remove    uint.1.1.1
 - remove    ulex.1.1
 - remove    uuidm.0.9.5
 - remove    uutf.0.9.3
 - remove    xmlm.1.2.0
 - remove    zarith.1.3
 - upgrade   ocamlfind from 1.5.4 to 1.5.5
 - downgrade cppo from 1.0.1 to 0.9.3              [upstream changes]
 - downgrade ocp-indent from 1.4.2 to 0.6.1        [upstream changes]
 - downgrade typerex from 1.99.6-beta to 1.99.2-beta [upstream changes]
=== ↑ 1   ↓ 3   ⊘ 60 ===
Do you want to continue ? [Y/n] n
AmirMacBook:~ amir$ opam config report
# OPAM status report
# opam-version    1.2.0
# self-upgrade    no
# os              darwin
# external-solver no
# criteria        -removed,-notuptodate,-changed*
# jobs            4
# repositories    1* (http), 1 (version-controlled)
# pinned          2 (version)
# current-switch  4.01.0*
# last-update     2014-10-27 11:40
yminsky commented 10 years ago

Me too. I suspect this is a widely hit problem.

~ $ opam update
[default] Downloading https://opam.ocaml.org/urls.txt
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...
[merlin] Fetching git://github.com/the-lambda-church/merlin.git#merlin2
[WARNING] A conflict was detected in your installation. This can be caused by updated
constraints in your installed packages:
  - No package matches ocp-indent>0.6.1.

You should run "opam upgrade --fixup" to resolve the situation.
samoht commented 10 years ago

Very hard to repro ... I've tried to install various combination of ocp-build and ocp-indent and everything works fine. @AltGr is in vacation, but I can try to have a deeper look at it tomorrow if that bug is blocking people.

dbuenzli commented 10 years ago

I have ocp-indent 1.4.2 and ocp-build 1.99.8-beta. Here's the end of upgrade with --debug.

00:10.277  087940  SOLVER                  resolve request=install:() remove:() upgrade:(base-bigarray & base-threads & base-unix & camlp4 & cppo & ocamlfind & ocp-build & ocp-indent & pkgopkg)
00:10.279  087940  SOLVER                  cudf_versions_map
00:10.298  087940  SOLVER                  Load cudf universe (depopts:false, build:true)
00:10.303  087940  CUDF                    resolve request=install:() remove:() upgrade:(pkgopkg (>= 1) & ocp-indent (>= 19) & ocp-build (>= 9) & ocamlfind & cppo (>= 4) & camlp4 (>= 1) & base-unix (>= 1) & base-threads (>= 1) & base-bigarray (>= 1)) criteria:"-removed,-notuptodate,-changed"
00:10.423  087940  SYSTEM                  [log-87940-d682c6] (in 0.005s) aspcud /Users/dbuenzli/.opam/log/solver-in-87940-d37749 /Users/dbuenzli/.opam/log/solver-out-87940-0ee25e -removed,-notuptodate,-changed
00:10.423  087940  SYSTEM                  rm /Users/dbuenzli/.opam/log/solver-in-87940-d37749
00:10.423  087940  SYSTEM                  rm /Users/dbuenzli/.opam/log/solver-out-87940-0ee25e
00:10.425  087940  CUDF                    Could not find corresponding version in cudf universe: ocp-indent (>= 19)
dbuenzli commented 10 years ago

Strange, I did an opam remove ocp-indent and then opam install ocp-indent at that point I was proposed to upgrade to ocamlfind 1.5.5, thus everything reinstalled and things are now ok.

yminsky commented 9 years ago

Any progress on this? I can presumably fix by blowing away my .opam directory and reinstalling, but it's pretty bad that this upgrade is breaking everyone's installs.

I'm using the latest opam from brew, to no avail, for what it's worth.

samoht commented 9 years ago

Try opam upgrade ocamlfind and see if things go better. The cause of the bug is #1834