diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-12-29 12:55:12 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-12-31 02:29:20 +0100 |
commit | cfc11b2e1d8480727208b9d3e9577172de9a4038 (patch) | |
tree | 3e9e1a65269ebf6eed634c2d2b79e8a0683c1b3d /apt-private | |
parent | abbe74b2b4690b9138da94d26a7e45ad80a3bf6c (diff) |
expand -f to --fix-broken in error messages
Users end up believing that this is a --force mode as -f is common for
that, but apt doesn't have such a mode and --fix-broken is really not
about forcing something but actually trying to fix the breakage which
tends to be the result of a user forcing something on its system via
low-level forced dpkg calls.
Example: The "common" pattern of "dpkg -i ./foo.deb; apt install -f" is
nowadays far better dealt with via "apt install ./foo.deb".
And while at it the two places handing out this suggestion are changed
to use the same strings to avoid needless translation work in the future
and the suggestion uses 'apt' instead of 'apt-get' as this will be run
interactively by a user, so its a good opportunity to showcase what we
can do and will allow us to be more helpful to the user.
Closes: #709092
Thanks: Kristian Glass for initial patch!
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-cachefile.cc | 5 | ||||
-rw-r--r-- | apt-private/private-install.cc | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc index 32cad1c33..77090f8eb 100644 --- a/apt-private/private-cachefile.cc +++ b/apt-private/private-cachefile.cc @@ -108,10 +108,9 @@ bool CacheFile::CheckDeps(bool AllowBroken) } else { - c1out << _("You might want to run 'apt-get -f install' to correct these.") << endl; + c1out << _("You might want to run 'apt --fix-broken install' to correct these.") << endl; ShowBroken(c1out,*this,true); - - return _error->Error(_("Unmet dependencies. Try using -f.")); + return _error->Error(_("Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).")); } return true; diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 761e4d175..e3fe46960 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -657,9 +657,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::stri packages */ if (BrokenFix == true && Cache->BrokenCount() != 0) { - c1out << _("You might want to run 'apt-get -f install' to correct these:") << std::endl; + c1out << _("You might want to run 'apt --fix-broken install' to correct these.") << std::endl; ShowBroken(c1out,Cache,false); - return _error->Error(_("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).")); + return _error->Error(_("Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).")); } if (Fix != NULL) |