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

opam upgrade -a package fails to resolve dependencies because it refuses to downgrade #3737

Open
RalfJung opened this issue Jan 31, 2019 · 0 comments

Comments

@RalfJung
Copy link

In https://gitlab.mpi-sws.org/iris/iris/-/jobs/23068, you can see that opam fails to execute opam upgrade -y --all build-dep/ coq with the error

The following dependencies couldn't be met:
  - coq-iris-builddep -> coq-stdpp (= dev.2018-11-12.0.1a00ee7e & = dev)
      no matching version
Your request can't be satisfied:
  - No available version of coq-stdpp satisfies the constraints

That error message is heavily misleading, the required version of coq-stdpp exists -- but it is older than the currently installed version. I can reproduce this locally easily by creating a situation in which installing the latest package in build-dep/ requires downgrading another package.

Curiously, if I remove the -a, the downgrade works as expected. However, the entire point of using opam upgrade -a PACKAGE is make sure that PAKCAGE is installed and everything is up-to-date in a single transaction. It seems that that's not actually currently possible in opam.

# opam config report
# opam-version      2.0.3 
# self-upgrade      no
# system            arch=x86_64 os=linux os-distribution=debian os-version=9
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              20
# repositories      2 (http), 1 (version-controlled) (default repo at ae294685)
# pinned            1 (rsync), 1 (version)
# current-switch    ocaml-base-compiler.4.02.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants