[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: version pinning in OPAM

On 10 Jul 2012, at 23:08, Thomas Gazagnaire wrote:
> Currently, the dev packages of mirage are managed with a special (git) 
> backend in OPAM. As a user, its quite convenient to always have the latest 
> HEAD installed of these packages, but as a developer, you must commit every 
> changes you make in order to trigger a recompilation ... This can quickly 
> become painful, so I've started implementing some kind of version pining for 
> OPAM. I have a first prototype almost working, it allows you to do the 
> following:
>  $ opam pin mirage-0.3dev /local/path  # the path will be used instead of the 
> remote git url
>  [ cd /local/path && hack hack hack ]
>  $ opam update  && opam upgrade # recompile all the packages which depends on 
> mirage-0.3dev, using the contents you have registered with "opam pin"
> Is this convenient ? Would it be better to have "opam pin mirage /local/path" 
> instead (ie. no package version) and a more specific update/upgrade command 
> (like "opam pin -reinstall") to just upgrade the pinned packages without 
> having to do a full upgrade ?

Hm, the version is a little meaningless with pinned packages, since the diff 
between the old/new version is what decides if it's reinstalled or not.  I'd 
prefer just to pin the package and not worry about version numbers.

The only problem I see with 'update && upgrade' is that you are forced to 
upgrade all packages, including any other ones that came from upstream.  Not 
sure if that will be a problem in practise or not.




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.