APT has 3 modes: no immediate configuration, all packages are configured
immediately and its default mode of configuring essentials and
pseudo-essentials immediately only. While this seems like a job of
different planers at first, it might be handy to have it as an option,
too, in case a planer (like apts internal one) supports different modes
where the introduction of individual planers would be counter intuitive.
unsigned int const flags,
OpProgress * const Progress)
{
unsigned int const flags,
OpProgress * const Progress)
{
if (Progress != NULL)
Progress->SubProgress(Cache.Head().PackageCount, _("Send request to planer"));
unsigned long p = 0;
if (Progress != NULL)
Progress->SubProgress(Cache.Head().PackageCount, _("Send request to planer"));
unsigned long p = 0;
if (reinst.empty() == false)
WriteOkay(Okay, output, "ReInstall:", reinst, "\n");
WriteOkay(Okay, output, "Planer: ", _config->Find("APT::Planer", "internal"), "\n");
if (reinst.empty() == false)
WriteOkay(Okay, output, "ReInstall:", reinst, "\n");
WriteOkay(Okay, output, "Planer: ", _config->Find("APT::Planer", "internal"), "\n");
+ if ((flags & Request::IMMEDIATE_CONFIGURATION_ALL) != 0)
+ WriteOkay(Okay, output, "Immediate-Configuration: yes\n");
+ else if ((flags & Request::NO_IMMEDIATE_CONFIGURATION) != 0)
+ WriteOkay(Okay, output, "Immediate-Configuration: no\n");
return WriteOkay(Okay, output, "\n");
}
/*}}}*/
return WriteOkay(Okay, output, "\n");
}
/*}}}*/
_config->Set("APT::Architectures", SubstVar(line, " ", ","));
else if (LineStartsWithAndStrip(line, "Planer:"))
; // purely informational line
_config->Set("APT::Architectures", SubstVar(line, " ", ","));
else if (LineStartsWithAndStrip(line, "Planer:"))
; // purely informational line
+ else if (LineStartsWithAndStrip(line, "Immediate-Configuration:"))
+ {
+ if (localStringToBool(line, true))
+ flags |= Request::IMMEDIATE_CONFIGURATION_ALL;
+ else
+ flags |= Request::NO_IMMEDIATE_CONFIGURATION;
+ }
else
_error->Warning("Unknown line in EIPP Request stanza: %s", line.c_str());
else
_error->Warning("Unknown line in EIPP Request stanza: %s", line.c_str());
class pkgPackageManager;
namespace EIPP /*{{{*/
{
class pkgPackageManager;
namespace EIPP /*{{{*/
{
+ namespace Request
+ {
+ enum Flags
+ {
+ 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 */
+ };
+ }
+
APT_HIDDEN bool WriteRequest(pkgDepCache &Cache, FileFd &output,
APT_HIDDEN bool WriteRequest(pkgDepCache &Cache, FileFd &output,
- unsigned int const version, OpProgress * const Progress);
+ unsigned int const flags, OpProgress * const Progress);
APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
OpProgress * const Progress);
APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
OpProgress * const Progress);
std::string const planer = _config->Find("APT::Planer", "internal");
if (planer != "internal")
{
std::string const planer = _config->Find("APT::Planer", "internal");
if (planer != "internal")
{
- if (EIPP::OrderInstall(planer.c_str(), this, 0, nullptr))
+ unsigned int flags = 0;
+ if (_config->FindB("APT::Immediate-Configure", true) == false)
+ flags |= EIPP::Request::NO_IMMEDIATE_CONFIGURATION;
+ else if (_config->FindB("APT::Immediate-Configure-All", false))
+ flags |= EIPP::Request::IMMEDIATE_CONFIGURATION_ALL;
+
+ if (EIPP::OrderInstall(planer.c_str(), this, flags, nullptr))
return Completed;
else
return Failed;
return Completed;
else
return Failed;
unsigned int flags;
if (EIPP::ReadRequest(input, actions, flags) == false)
DIE("Parsing the request failed!");
unsigned int flags;
if (EIPP::ReadRequest(input, actions, flags) == false)
DIE("Parsing the request failed!");
+ _config->Set("APT::Immediate-Configure", (flags & EIPP::Request::NO_IMMEDIATE_CONFIGURATION) == 0);
+ _config->Set("APT::Immediate-Configure-All", (flags & EIPP::Request::IMMEDIATE_CONFIGURATION_ALL) != 0);
EDSP::WriteProgress(5, "Read scenario…", output);
EDSP::WriteProgress(5, "Read scenario…", output);
informational string specifying to which planer this request was send
initially.
informational string specifying to which planer this request was send
initially.
+- *Immediate-Configuration:** (option, unset by default) A boolean value
+ defining if the planer should try to configure all packages as quickly
+ as possible (true) or shouldn't perform any kind of immediate
+ configuration at all (false). If not explicitly set with this field
+ the planer is free to pick either mode or implementing e.g. a mode
+ which configures only packages immediately if they are flagged as
+ `Essential` (or are dependencies of packages marked as `Essential`).
+