[opam-devel] How to manage a package manager (Was: Re: [opam] Build clarification (#1149))

Roberto Di Cosmo roberto at dicosmo.org
Sat Feb 1 13:10:44 GMT 2014


On Sat, Feb 01, 2014 at 12:19:34PM +0100, Anil Madhavapeddy wrote:
> 
> My point (perhaps not made clearly enough) is that we already followed your
> practice with OPAM 1.0 -> 1.1.  

I see your point: good practice says that when moving from repo n to repo n+1
one needs to leave on repo n a trail leading to repo n+1, and your repo file
is a *partial* way of implementing this trail, as recent enough versions of opam
will find the lead and follow it. I say partial because you need to manually
upgrade opam to find out that something changed... and this will not scale when
OCaml will have conquered the world :-)

Now let me make my point clearer: the only way to make sure that, no matter
what changes will happen (and there will be...), nobody is left behind, is
to leave on every repository a version of opam recent enough to perform a
smooth transition. Quoting myself, the important missing part today is the one 
pointed at by the arrow below

     Time T : I have opam version n installed, accessing repo version n

     Time T+delta: some major changes make the old opam unable to use the new
                repository format, and the repository migrates to a new place;
                a new version n+1 of opam is released, embedding logic to access
                the new repository;
 ===>           opam version n+1 is added also to repo version n
 ===>
 ===> Sometimes later: the user of opam n runs an update, sees that a new
 ===>                 version of opam is available, and upgrades it...
                      he now has the new opam, that updates the references
                      to the new repository, and keeps following the evolution
                      of the repository, with no pain

So, basically, my big feature whish is to see opam *packaged* as an opam
package. 

I remember that in the past that was the case, but there were issues
that forced opam to stop being an opam package. 

I wonder what these issues were, and whether they can now easily be solved...
one is the location where the binary opam should be installed: as I said in my
previous mail, it cannot go under the 4.00/3.12/whatever directories, as it is
supposed to be the package manager, maybe there are other?

@samoth : even an approximate brain dump would be very useful here...
I have opened an issue for this purpose https://github.com/ocaml/opam/issues/1150

--
Roberto


More information about the opam-devel mailing list