summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/edsp.cc4
-rw-r--r--apt-pkg/edsp.h1
-rw-r--r--apt-pkg/packagemanager.cc2
3 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index e79bb804c..1c6be8afe 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -1155,6 +1155,8 @@ bool EIPP::WriteRequest(pkgDepCache &Cache, FileFd &output, /*{{{*/
WriteOkay(Okay, output, "Immediate-Configuration: yes\n");
else if ((flags & Request::NO_IMMEDIATE_CONFIGURATION) != 0)
WriteOkay(Okay, output, "Immediate-Configuration: no\n");
+ else if ((flags & Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS) != 0)
+ WriteOkay(Okay, output, "Allow-Temporary-Remove-of-Essentials: yes\n");
return WriteOkay(Okay, output, "\n");
}
/*}}}*/
@@ -1389,6 +1391,8 @@ bool EIPP::ReadRequest(int const input, std::list<std::pair<std::string,PKG_ACTI
else
flags |= Request::NO_IMMEDIATE_CONFIGURATION;
}
+ else if (ReadFlag(flags, line, "Allow-Temporary-Remove-of-Essentials:", Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS))
+ ;
else
_error->Warning("Unknown line in EIPP Request stanza: %s", line.c_str());
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index e1ffdf598..4adfc95e9 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -245,6 +245,7 @@ namespace EIPP /*{{{*/
{
IMMEDIATE_CONFIGURATION_ALL = (1 << 0), /*!< try to keep the least amount of packages unconfigured as possible at all times */
NO_IMMEDIATE_CONFIGURATION = (1 << 1), /*!< do not perform immediate configuration at all */
+ ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS = (1 << 2), /*!< just as the name suggests, very special case and dangerous! */
};
}
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index d5afceb6d..a61c5f7a9 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1045,6 +1045,8 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
flags |= EIPP::Request::NO_IMMEDIATE_CONFIGURATION;
else if (_config->FindB("APT::Immediate-Configure-All", false))
flags |= EIPP::Request::IMMEDIATE_CONFIGURATION_ALL;
+ else if (_config->FindB("APT::Force-LoopBreak", false))
+ flags |= EIPP::Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS;
if (EIPP::OrderInstall(planer.c_str(), this, flags, nullptr))
return Completed;