[erlang-questions] Erlang package manager

Tuncer Ayaz tuncer.ayaz@REDACTED
Mon Dec 22 13:13:55 CET 2014


On Mon, Dec 22, 2014 at 12:36 PM, Loic Hoguin wrote:
> Hello,
>
> Adding something I believe nobody mentioned yet (if I missed it,
> sorry).
>
> The way things are now there are many companies or larger projects
> who have a fork of some of the projects they use, because they need
> a specific set of patches on top of them (sometimes these can easily
> be contributed back; but sometimes they are plain hacks).
>
> The package manager should be able to handle this, perhaps by
> allowing some package information to be overriden to allow changing
> the source location.
>
> Another solution could be to allow applying a set of patch files.
>
> None of this would apply to binary-only packages though, of course.

That's what 'pinning' is for, and AFAIR it has been mentioned by
others, but it's good to point it out again for clarity :).

For example, with opam you can do the following:

# fetch source and pin as preferred source
$ opam source public_pkg --pin
$ cd public_pkg
# apply modifications

# add pkg that only exists locally
$ cd private_pkg
$ opam pin add private_pkg .

Now, anytime you run 'opam install' or 'opam upgrade', opam will use
the local dir as the source.

Gentoo's portage calls this an 'overlay'.

You may also want a similar feature like Debian's pinning, but that's
a different thing, and I'm not sure if it's needed.



More information about the erlang-questions mailing list