Closed edwintorok closed 12 years ago
Yes the remove code is a bit broken at the moment, I am in the process of releasing 0.8 with a much better solver interface wich should hopefully fix that.
This should be fixed by the recent changes in the solver API.
I'm on opam 1.0 and having this issue.
You mean that opam remove pcre-ocaml
doesn't do anything ?
well, I ran opam update following by upgrade. It attempted to install yojson 1.1.6 but failed, saying I still had 1.1.3. Then I tried to "opam remove yojson", nothing happened, it did not say, success, nor error, it just returned. I had to remove the .opam directory and reinstalled everything to fix it.
Here is the tail of 'opam remove yojson --debug', it doesn't remove yojson, and it doesn't tell why either:
[15310] SOLVER resolve request=install:(alt-ergo (= 0.95.1) & base-bigarray (= base) & base-threads (= base) & base-unix (= base) & batteries (= 2.0.0) & bench (= 1.3) & bin_prot (= 109.15.00) & biniou (= 1.0.6) & bisect (= 1.3) & bitstring (= 2.0.3) & camlp5 (= 6.07) & camomile (= 0.8.3) & cmdliner (= 0.9.2) & comparelib (= 109.15.00) & config-file (= 1.1) & cppo (= 0.9.3) & cryptokit (= 1.7) & delimcc (= 0) & dyntype (= 0.9.0) & dypgen (= 20120619-1) & easy-format (= 1.0.1) & extlib (= 1.5.4) & fieldslib (= 109.20.00) & fileutils (= 0.4.4) & flowcaml (= 1.07) & froc (= 0.2.2) & glMLite (= 0.03.51) & headache (= 1.03) & herelib (= 109.15.00) & jsonm (= 0.9.1) & kaputt (= 1.2) & lablgtk (= 2.16.0) & ledit (= 2.03) & lwt (= 2.4.3) & mascot (= 1.0) & menhir (= 20120123) & meta_conv (= 1.1.0) & msgpack (= 1.0.0) & oasis (= 0.3.0) & ocaml-data-notation (= 0.0.10) & ocaml-indent (= 1.1.0) & ocamlfind (= 1.3.3) & ocamlgraph (= 1.8.2) & ocamlify (= 0.0.1) & ocamlmod (= 0.0.3) & ocamlnet (= 3.6.3) & ocamlrss (= 2.2.0) & ocp-build (= 1.99.6-beta) & ocp-indent (= 1.2.0) & ocp-index (= 0.1.0) & omake (= 0.9.8.6-0.rc1) & ospec (= 0.3.0) & ounit (= 1.1.2) & pcre-ocaml (= 7.0.2) & pipebang (= 109.15.00) & pprint (= 20130324) & promela (= 0.4.2) & re (= 1.2.1) & react (= 0.9.4) & res (= 3.2.0) & safepass (= 1.2) & sexplib (= 109.20.00) & ssl (= 0.4.6) & stog (= 0.8.0) & tiny_json (= 1.0.1) & tiny_json_conv (= 1.3.0) & type_conv (= 109.20.00) & typerex (= 1.99.6-beta) & ulex (= 1.1) & uucd (= 0.9.0) & uutf (= 0.9.1) & variantslib (= 109.15.00) & xmlm (= 1.1.1) & xtmpl (= 0.6)) remove:(yojson) upgrade:() [15310] SYSTEM [log-5a61c5] which aspcud [15310] HEURISTIC resolve: sucess! final-universe={ alt-ergo.109(installed), base-bigarray.288(installed), base-threads.288(installed), base-unix.288(installed), batteries.181(installed), bench.137(installed), bin%5fprot.267(installed), biniou.121(installed), bisect.137(installed), bitstring.184(installed), camlp5.243(installed), camomile.76(installed), cmdliner.83(installed), comparelib.267(installed), config-file.122(installed), cppo.84(installed), cryptokit.162(installed), delimcc.1(installed), dyntype.81(installed), dypgen.283(installed), easy-format.115(installed), extlib.158(installed), fieldslib.273(installed), fileutils.44(installed), flowcaml.162(installed), froc.24(installed), glMLite.38(installed), headache.137(installed), herelib.267(installed), jsonm.82(installed), kaputt.130(installed), lablgtk.207(installed), ledit.196(installed), lwt.203(installed), mascot.110(installed), menhir.279(installed), meta%5fconv.123(installed), msgpack.114(installed), oasis.32(installed), ocaml-data-notation.10(installed), ocaml-indent.123(installed), ocamlfind.141(installed), ocamlgraph.166(installed), ocamlify.4(installed), ocamlmod.6(installed), ocamlnet.228(installed), ocamlrss.194(installed), ocp-build.179(installed), ocp-indent.131(installed), ocp-index.12(installed), omake.92(installed), ospec.32(installed), ounit.126(installed), pcre-ocaml.246(installed), pipebang.267(installed), pprint.285(installed), promela.42(installed), re.132(installed), react.85(installed), res.222(installed), safepass.130(installed), sexplib.273(installed), ssl.45(installed), stog.73(installed), tiny%5fjson.115(installed), tiny%5fjson%5fconv.138(installed), type%5fconv.273(installed), typerex.179(installed), ulex.122(installed), uucd.81(installed), uutf.82(installed), variantslib.267(installed), xmlm.125(installed), xtmpl.57(installed) } [15310] HEURISTIC resolve: interesting_packages={} [15310] HEURISTIC minimize minimizable={} [15310] SOLVER graph_of_actions root_actions={} [15310] 15310 unlocking /home/edwin/.opam/4.00.1/lock
There doesn't seem to be a way to find out what packages depend on a certain package, and what would need to be done to remove it:
$ opam remove pcre-ocaml $ opam --version opam version 0.7.7
I would've expected 'opam remove' to show a list of packages that prevent the removal, or at least some other command to print the dependencies (like apt-cache's rdepends and depends commands).
I can of course grep the package repository, but that is not very user-friendly, and also it'd tell me all packages that can depend on pcre-ocaml, not just the ones that are installed.