[opam-devel] .opam

Roberto Di Cosmo roberto at dicosmo.org
Thu Sep 19 13:49:54 BST 2013


On Thu, Sep 19, 2013 at 01:28:37PM +0100, Anil Madhavapeddy wrote:
> On 19 Sep 2013, at 12:43, Roberto Di Cosmo <roberto at dicosmo.org> wrote:
> 
> > On Thu, Sep 19, 2013 at 01:03:30PM +0200, Dagnat Fabien wrote:
> > <snip>
> >> Share some parts: for example a stable caml shared by several users and keeping
> >> the ability to install some libraries or switches on per user basis.
> >> 
> > 
> > Indeed, this is something which would greatly help.
> > 
> > In Python, they have virtualenv for doing this, see
> > 
> >  http://www.pythonforbeginners.com/basics/python-virtualenv-usage/
> 
> Is there any reason storing the contents of .opam in a Git repository
> wouldn't work for this?
> 

You mean, to share common pieces and avoid exploding the disk quota?
Of course, the hash-based approach used in git is in principle the
right solution, but in practice, AFAIK, git as a tool is not built
to work in a multi-user environment (I mean, a shared .git repo accessed by
multiple users at a time, each keeping a local view of the components,
and yet sharing all of them).

One of the uses of virtualenv is with the

 --system-site-packages

option to provide the proper symbolic links to the system-wide
installation (and replacing system-wide packages with local copies
if this needs be).

If one wants to spend time on this for opam, a good start would
be a little brainstorming session in front of a blackboard to see
how to accommodate:

 - performing a shallow clone of a reference shared repo into a user
   .opam

 - installing/overriding packages in the shared repo with local copies
   when requested by the user

 - fixing/garbage collecting a local repo:

   + if a shared package disappears, opam for the local user should notice
     and install locally a replacement version

   + if a shared package appears, opam for the local user should notice
     and replace the local copy with a link to the shared one

All this might be more complex than one thinks, due to the need to handle
the permissions on the file systems...

--
Roberto




> -anil
> 

-- 
Roberto Di Cosmo
 
------------------------------------------------------------------
Professeur               En delegation a l'INRIA
PPS                      E-mail: roberto at dicosmo.org
Universite Paris Diderot WWW  : http://www.dicosmo.org
Case 7014                Tel  : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann       
F-75205 Paris Cedex 13   Identica: http://identi.ca/rdicosmo
FRANCE.                  Twitter: http://twitter.com/rdicosmo
------------------------------------------------------------------
Attachments:
MIME accepted, Word deprecated
      http://www.gnu.org/philosophy/no-word-attachments.html
------------------------------------------------------------------
Office location:
 
Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France
Metro Bibliotheque Francois Mitterrand, ligne 14/RER C
-----------------------------------------------------------------
GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3                        


More information about the opam-devel mailing list