summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-11-17 17:20:29 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2021-11-17 17:21:03 +0100
commit21cc694f55de7caede8dcef3831236b6ca855cd7 (patch)
tree388af9bc4dd795b2486e4e5e50a069af63143407 /apt-private/private-install.cc
parentf4c4f057665adf5d26b6d83be30362fcd837db22 (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.cc14
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
{