summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-06 17:58:00 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:57:12 +0200
commit8d1cb6da6e21302c654da3f09de3975af7e4a11f (patch)
treeeb859b40742234e02d00f44f1b26702c538220eb /apt-pkg/edsp.cc
parent91abb30f1c46287d386b646cef8cb42eadcaa250 (diff)
eipp: add Allow-Temporary-Remove-of-Essentials
A rather special need option, but the internal planer supports this and we have a testcase for it & sometimes it is hit (as a bug through). The option itself mostly serves as a reminder for implementors that they should be careful with removes and especially temporary removes if they perform any.
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc4
1 files changed, 4 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());