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

mirage configure fails in a git repository with no origin remote #1188

Closed
yomimono opened this issue Sep 13, 2020 · 3 comments
Closed

mirage configure fails in a git repository with no origin remote #1188

yomimono opened this issue Sep 13, 2020 · 3 comments

Comments

@yomimono
Copy link
Contributor

Creating an origin remote pointed somewhere stupid fixes this.

@yomimono
Copy link
Contributor Author

It looks like this is caused by some autodetection magic in Functoria's opam-related logic ( https://github.com/mirage/mirage/blob/master/lib/functoria/opam.ml#L34 ) and that if I had passed a value noting that I don't want mirage to do anything clever with my git repos, I could also have gotten around this.

The existing error message, fatal: No such remote 'origin', at least tells me what I can do (if I'm sufficiently traumatized to immediately blame git), but directions to configuring Mirage properly would be appreciated.

hannesm added a commit to hannesm/mirage that referenced this issue Nov 27, 2020
As reported in mirage#1188, in case no git remote is specified (or no branch
is configured), git will complain to stderr "fatal: No such remote 'origin'".
The code in question is used to include a src url into the generated opam
file on a best-effort basis, and already handles errors (e.g. the unikernel is
not developed in a git repository) by using a dummy url.
@hannesm
Copy link
Member

hannesm commented Nov 27, 2020

Thanks for your report. I was able to reproduce this locally, and opened #1201 with a fix. While reproducing I encountered a similar issue: execute mirage configure in a git repository with no commits (i.e. have your unikernel, and do a git init later); here dune fails (reported at ocaml/dune#3979).

@hannesm
Copy link
Member

hannesm commented Nov 30, 2020

this is fixed in the branch 3 (soon in the master branch as well), and will be part of the next release (this week).

@hannesm hannesm closed this as completed Nov 30, 2020
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

2 participants