Skip to content

opam: avoid the repo management script to alway try to initialize the opam repositories

The systemd error:

Apr 19 14:23:47 worker2 opam-manage-shared-state.sh[473062]: [NOTE] Will configure from built-in defaults.
Apr 19 14:23:47 worker2 opam-manage-shared-state.sh[473062]: Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
Apr 19 14:23:47 worker2 opam-manage-shared-state.sh[473062]: <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
Apr 19 14:23:47 worker2 opam-manage-shared-state.sh[473062]: [coq.inria.fr] no changes from https://coq.inria.fr/opam/released/
Apr 19 14:23:48 worker2 opam-manage-shared-state.sh[473062]: [github.com] no changes from git+https://github.com/OCamlPro/ocamlbench-repo.git
Apr 19 14:23:52 worker2 opam-manage-shared-state.sh[473062]: [opam.ocaml.org] no changes from https://opam.ocaml.org
Apr 19 14:23:57 worker2 opam-manage-shared-state.sh[473131]: [ERROR] Repository coq.inria.fr is already set up and points to https://coq.inria.fr/opam/released/. To change that, use 'opam repository set-url'.
Apr 19 14:23:57 worker2 systemd[1]: opam-manage-shared-state.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

the opam output for the repo list is the following:

swhworker@worker2:/tmp/opam$ opam repo list --all --root /tmp/opam
# Repository   # Url                                               # Switches(rank)
coq.inria.fr   https://coq.inria.fr/opam/released/                 <default>(1)
github.com     git+https://github.com/OCamlPro/ocamlbench-repo.git
opam.ocaml.org https://opam.ocaml.org

The grep of the repo with -x doesn't match the complete line

swhworker@worker2:/tmp/opam$ opam repo --all --root /tmp/opam | grep  -x https://coq.inria.fr/opam/released
swhworker@worker2:/tmp/opam$ opam repo --all --root /tmp/opam | grep  https://coq.inria.fr/opam/released
coq.inria.fr   https://coq.inria.fr/opam/released/                 <default>(1)

so the repos are always initialized


Migrated from D7602 (view on Phabricator)

Merge request reports