[Nix-dev] nix-env should select most recent version

Eelco Dolstra eelco at cs.uu.nl
Wed Nov 10 16:58:09 CET 2004


Hi,

On Wed, 10 Nov 2004 16:44:06 +0100
Armijn Hemel <armijn at uulug.nl> wrote:

> On Wed, Nov 10, 2004 at 04:19:07PM +0100, Eelco Visser wrote:
> > Would it be an idea to automatically install the 'latest' version of a
> > package in case more than one is available?
> > 
> >    nix-env -i subversion
> > 
> > resulted in
> > 
> > collission between
> > `/nix/store/d339e9f8933de861ba66b7913f5b5b64-subversion-1.0.9/bin/apr
> > -config' and `/nix/store/c358dd31cc3b2cba849
> > 7100e54c41a18-subversion-1.1.1/bin/apr-config' at
> > /nix/store/6e2664c4f003efef986d045bafcf95f2-builder.pl line 61.
> 
> Exact same problem I had. I made a script based on martin's
> make-symlinks.sh, which I have to commit.

That's actually not the same problem.  In your case the problem was that
there were two packages (coreutils and net-tools) providing the same
command (hostname), while here the problem is that nix-env installs
multiple versions of the same package, while it should really just install
the latest.

Installing the latest version changes the semantics of nix-env -i, though.
Currently the semantics is that every command-line argument is a
pattern-match against which all available packages are matched.  And since
every version of Subversion matches the pattern "subversion", they will
all be installed.  Changing this to only install the latest version could
break nix-env -i '*'.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list