diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-09-17 12:08:49 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-09-17 12:09:54 +0200 |
commit | 42808fa281dfc2661d82c1f6145982f20970a004 (patch) | |
tree | f76a2579586b0562308c79e8c934dd0521f23641 /src/nix-env | |
parent | 12a4aea93d48f133ecdb82beba0c0109b0198ada (diff) |
nix-env --upgrade: show "downgrading" when doing so
It was strange to show "upgrading" when the version was getting lower.
This is left on "upgrading" when the versions are the same,
as I can't see any better wording.
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/nix-env.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index ddbba2484..400b148e9 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -602,9 +602,11 @@ static void upgradeDerivations(Globals & globals, i.queryOutPath() != bestElem->queryOutPath()) { + const char * action = compareVersions(drvName.version, bestVersion) <= 0 + ? "upgrading" : "downgrading"; printMsg(lvlInfo, - format("upgrading ‘%1%’ to ‘%2%’") - % i.name % bestElem->name); + format("%1% ‘%2%’ to ‘%3%’") + % action % i.name % bestElem->name); newElems.push_back(*bestElem); } else newElems.push_back(i); |