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 pin failure on janestreet's packages #3245

Closed
Ninjapouet opened this issue Mar 6, 2018 · 1 comment
Closed

opam pin failure on janestreet's packages #3245

Ninjapouet opened this issue Mar 6, 2018 · 1 comment

Comments

@Ninjapouet
Copy link

Ninjapouet commented Mar 6, 2018

Hi,

I've a strange behavior using the current opam 2.0.0~rc:

$  opam pin add --debug -n -vvv ocaml-compiler-libs v0.10.0
00:00.001  GSTATE                  LOAD-GLOBAL-STATE @ /home/blond/.opam
00:00.001  RSTATE                  LOAD-REPOSITORY-STATE @ /home/blond/.opam
00:00.084  RSTATE                  Loaded /home/blond/.opam/repo/state.cache in 0.081s
00:00.206  RSTATE                  Cache found
00:00.206  STATE                   LOAD-SWITCH-STATE @ 4.06.1
00:00.254  STATE                   Detected changed packages (marked for reinstall): {}
00:00.257  STATE                   Switch state loaded in 0.051s
00:00.257  FILE(switch-state)      Wrote /home/blond/.opam/4.06.1/.opam-switch/backup/state-20180306162455.export in 0.000s
00:00.257  COMMAND                 pin ocaml-compiler-libs to  file://<path>/v0.10.0
00:00.258  UPDATE                  updating file:///<path>/v0.10.0
00:00.258  RSYNC                   rsync: src=/<path>/v0.10.0 dst=/home/blond/.opam/4.06.1/.opam-switch/sources/ocaml-compiler-libs
[ERROR] Error getting source from file:///<path>/v0.10.0
00:00.261  SYSTEM                  rm /home/blond/.opam/4.06.1/.opam-switch/backup/state-20180306162455.export
'opam pin add --debug -n -vvv ocaml-compiler-libs v0.10.0' failed.

Where <path> is a common and regular directory just masked for this is a production code. The same problem occurs on all package whose version starts with 'v' (didn't tried with another non-digit character, though). As shown by the traces above, source pinning got somehow confused and show no version (there is a double space) and a silly url with the <path> sided with the version. Please note that <path> seems to be the current working directory.

My opam-repository clone is based on 2.0.0 branch and the corresponding opam descriptions are unchanged.

Regards.

# opam config report
# opam-version      2.0.0~rc 
# self-upgrade      no
# system            arch=x86_64 os=linux os-distribution=linuxmint os-version=18.1
# 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              4
# repositories      1 (http), 3 (local) (default repo at 9371f757)
# pinned            0
# current-switch    4.06.1
Ninjapouet pushed a commit to Ninjapouet/opam that referenced this issue Mar 7, 2018
Fixes ocaml#3245: pin_target is now smart enough to detect Janestreet's
version naming convention as a version and not as a directory.
@Ninjapouet
Copy link
Author

Ninjapouet commented Mar 7, 2018

I wrote a small patch that fixes the issue but i wonder if trying to detect version/path is a good idea for, as far as i know, there is no real version naming convention for ocaml packages ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant