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 update stops working if an installed package's url changes from tarball to git #3991

Closed
mato opened this issue Sep 25, 2019 · 1 comment · Fixed by #4007
Closed

opam update stops working if an installed package's url changes from tarball to git #3991

mato opened this issue Sep 25, 2019 · 1 comment · Fixed by #4007
Milestone

Comments

@mato
Copy link
Contributor

mato commented Sep 25, 2019

As I discovered today while moving packages around in the Solo5 staging repository, if a package is installed in an opam switch, and that package's url changes from a release tarball to a Git repository, opam update will start failing with this message:

$ opam update
[ERROR] Command "/usr/bin/git diff --no-ext-diff --quiet" failed:
"/usr/bin/git diff --no-ext-diff --quiet" exited with code 129
$ cat ~/.opam/log/log-20708-6d07ae.info 
# path        ~/.opam/solo5-4.09.0/.opam-switch/sources/solo5-bindings-hvt.0.6.2
# command     /usr/bin/git diff --no-ext-diff --quiet
# env-file    ~/.opam/log/log-20708-6d07ae.env
# output-file ~/.opam/log/log-20708-6d07ae.out
$ cat ~/.opam/log/log-20708-6d07ae.out 
Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>

I had to strace opam to find the path to the above log file, it would also be useful to give a pointer to this if commands such as this fail.

@rjbou
Copy link
Collaborator

rjbou commented Oct 22, 2019

Thanks for the report!

@rjbou rjbou added this to the 2.1.0 milestone Oct 22, 2019
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

Successfully merging a pull request may close this issue.

2 participants