diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2021-11-17 17:20:29 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2021-11-17 17:21:03 +0100 |
| commit | 21cc694f55de7caede8dcef3831236b6ca855cd7 (patch) | |
| tree | 388af9bc4dd795b2486e4e5e50a069af63143407 /apt-private/private-install.cc | |
| parent | f4c4f057665adf5d26b6d83be30362fcd837db22 (diff) | |
Require argument to remove essential packages, do not prompt
Let's make this one step harder.
Diffstat (limited to 'apt-private/private-install.cc')
| -rw-r--r-- | apt-private/private-install.cc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 2420865cb..aaf98539a 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -304,19 +304,7 @@ bool InstallPackages(CacheFile &Cache, APT::PackageVector &HeldBackPackages, boo if (_config->FindB("APT::Get::Trivial-Only",false) == true) return _error->Error(_("Trivial Only specified but this is not a trivial operation.")); - // TRANSLATOR: This string needs to be typed by the user as a confirmation, so be - // careful with hard to type or special characters (like non-breaking spaces) - const char *Prompt = _("Yes, do as I say!"); - std::string question; - strprintf(question, - _("You are about to do something potentially harmful.\n" - "To continue type in the phrase '%s'\n" - " ?] "),Prompt); - if (AnalPrompt(question, Prompt) == false) - { - c2out << _("Abort.") << std::endl; - exit(1); - } + return _error->Error(_("Removing essential system-critical packages is not permitted. This might break the system.")); } else { |
