[Nix-dev] Wrong behaviour on "nix-env -u"

Lluís Batlle viriketo at gmail.com
Tue Oct 13 12:11:23 CEST 2009


2009/10/13 Eelco Dolstra <e.dolstra at tudelft.nl>:
> Hi,
>
> Lluís Batlle wrote:
>
>> to let Delft know, I tried a "nix-env -u '*' --dry-run", and among the
>> coherent results, I got this line:
>> upgrading `ise-webpack-10.1.3.1' to `ise-webpack-10.1.3.1'
>>
>> As far as I understand "-u", this package should not be proposed for
>> update unless "--eq" is passed.
>
> The only way that this should be possible (modulo bugs) is if you have a
> priority meta-attribute on the installed or new package.  Nix-env does upgrade
> to packages with the same (or lower) version if the new package has a higher
> priority (= numerically lower "priority" field).  You can see the priority with
> nix-env -q --meta --xml.

In both examples I gave I once set priorities, numerically above 0 in
the field. But I don't know how I can set the priorities for
non-installed packages, which I assume will be all 0?
I see in the xml that the priorities are set not only to 'name', but
also to 'attrPath'. Do both determine what the priority is set to? So
in my case maybe the 'attrPath' was changed, and that's why a new
priority of '0' for them appears?

Although this exlpains my problems, I can't say I like this behaviour.
Why are priorities taken into account? I can't find this information
in nix-env(1) either.

Regards,
Lluís.



More information about the nix-dev mailing list