Re: opam packaging

"Hendrik Boom [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
On Mon, Nov 30, 2015 at 03:47:19PM -0500, Ashish Agarwal [email protected] [ocaml_beginners] wrote:
> On Thu, Nov 26, 2015 at 4:32 PM, Hendrik Boom [email protected]
> [ocaml_beginners] <[email protected]> wrote:
> 
> > Is this the right forum for questions like this?
> >
> Sure, although there is also the opam-devel list that could be used:
> http://lists.ocaml.org/listinfo/opam-devel
> 
> I do want to avoid confusion between mine and the official opam
> > packages of the same name.
> >
> You can do `opam repo priority`. Setting a higher priority to a repo gives
> it higher precedence. See:
> http://opam.ocaml.org/doc/Manual.html#Metadataprecedence
> 
> 
> > Perhaps all this is clearly discussed in documentatino somewhere. If so
> > I'd appreciate pointers to said documentation.
> >
> 
> See the "documentation" link from opam.ocaml.org, but in my experience the
> manual is out-of-date or missing many features.
> 
> (1) Where do I find the actual packages -- source and metadata in the
> > .opam directory? Presumably once I have this, it will be clearer hos to
> > proceed.
> >
> If I understand what you're trying to do correctly, you shouldn't need to
> know this. You just need to create another repository, and add it with
> `opam repo add`. In general, you shouldn't manually modify anything under
> your .opam directory.

So is the .opam a repository?  Or does it contain a repository?
And the various packages that opam will download for me, do they come 
from a net-accessinle repository?  Or each from its own?

And I'd have to set up another repository for my packages or my 
modified packages to reside in?

> 
> (2) What naming conventions are there to distinguish different versions
> > of a package so that specific ones are picked up by programs like
> > ocamlfind and ocamlbuild?
> >
> Note there is no connection between an opam package name, an ocamlfind
> package name, and an OCaml library name. Usually, they are of course
> somewhat similar, but there's nothing to enforce that.
> 
> You specifically mention "different versions of a package". With OPAM, you
> can only install multiple versions of the same package by putting them in
> different switches. Then when you do an `opam switch`, there is no choice
> about which version ocamlfind or ocamlbuild will pick since within a switch
> there is only one version visible.

I'll have to read up on switches before I have follow-up questions.

> 
> (3) Once I do have package source code and have edited it
> >
> Again, if I'm understanding your goals correctly, you shouldn't be
> modifying a packages source code, only its opam metadata.

I want to add functionality to an existing package, and/or fix things 
that I consider bugs, whether the original author does or not.
For that, I suspect I need to modify the source code.

When it's all working, I'd submit the changes upstream, and they can be 
accepted or not.

To find the source code, do I have to unpack the tarball under 
.opam/archives?  Or is there some way to identify a distributed revision 
management repository it might be better to pull from?

Thank you.

-- hendrik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.