<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I wonder if you've been bitten by the git/local autodetection.  OPAM 1.2b4 spots that the local directory that you're pinning to is a git repository, and turns it into a git remote instead.  if you haven't committed the `opam` file to the local git, then it won't be seen by opam.<div><br></div><div>Can you try</div><div><br></div><div>opam pin -k local add foo ~/code/foo</div><div><br></div><div>and see if you get the expected behaviour of using the existing opam file?</div><div><br></div><div>This is the OPAM issue for the autodetection:</div><div><a href="https://github.com/ocaml/opam/issues/1582">https://github.com/ocaml/opam/issues/1582</a></div><div><br></div><div>If this is indeed your bug, I'm of the firmer notion that this smart probing should be deactivated before the final release.</div><div><br></div><div>-a</div><div><br><div><div>On 17 Aug 2014, at 11:16, Ashish Agarwal <<a href="mailto:agarwal1975@gmail.com">agarwal1975@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I'm trying out 1.2.0-beta4 and wondering what is the correct workflow for local development packages.<div><br></div><div>Say I have a local package `foo` that is not defined in any repository. I put an opam file in the root of the package's source directory, then did `opam pin add foo ~/code/foo`. However, opam doesn't detect the opam file, and instead says "package not defined, would I like to define a new package". At this point you have to answer yes, and opam creates a new opam file, which is not what I want.</div>

<div><br></div><div>Even if the package is defined in a repository, I want opam to detect the opam file in the source directory, not that defined in the repo.</div><div><br></div>The recent platform blog post says opam pin "will generate a new package on the fly by detecting the presence of an opam file within the source repository itself". Where should this opam file be?<div>

<br></div><div>Note I'm trying to simplify my previous workflow, where I would put the opam file in the source directory at the path "opam/packages/foo/foo.master/opam". Then I would first add this as a repo and also pin to this directory. I'm trying to avoid the first part; I shouldn't have to add a repo per package.</div>

<div><br></div></div>
_______________________________________________<br>opam-devel mailing list<br><a href="mailto:opam-devel@lists.ocaml.org">opam-devel@lists.ocaml.org</a><br>http://lists.ocaml.org/listinfo/opam-devel<br></blockquote></div><br></div></body></html>