mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
nix profile upgrade: Always upgrade unlocked flakerefs
The "lockedRef" field is a misnomer, since it can be unlocked (e.g. for a dirty Git workdir). In that case, `nix profile upgrade` needs to assume that the package can have changed, and perform an upgrade.
This commit is contained in:
parent
eaa6c26189
commit
2306e96767
@ -648,7 +648,9 @@ struct CmdProfileUpgrade : virtual SourceExprCommand, MixDefaultProfile, MixProf
|
|||||||
assert(infop);
|
assert(infop);
|
||||||
auto & info = *infop;
|
auto & info = *infop;
|
||||||
|
|
||||||
if (element.source->lockedRef == info.flake.lockedRef) continue;
|
if (info.flake.lockedRef.input.isLocked()
|
||||||
|
&& element.source->lockedRef == info.flake.lockedRef)
|
||||||
|
continue;
|
||||||
|
|
||||||
printInfo("upgrading '%s' from flake '%s' to '%s'",
|
printInfo("upgrading '%s' from flake '%s' to '%s'",
|
||||||
element.source->attrPath, element.source->lockedRef, info.flake.lockedRef);
|
element.source->attrPath, element.source->lockedRef, info.flake.lockedRef);
|
||||||
|
Loading…
Reference in New Issue
Block a user