From 21cc694f55de7caede8dcef3831236b6ca855cd7 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 17 Nov 2021 17:20:29 +0100 Subject: Require argument to remove essential packages, do not prompt Let's make this one step harder. --- apt-private/private-install.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'apt-private/private-install.cc') 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 { -- cgit v1.2.3-70-g09d2