summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-14 18:07:12 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:43:09 +0200
commit7b197262212f49b3b355b1124edf2ba9adb73411 (patch)
treec8ab09827d1e96915d07e127177253dd1aa7c329 /apt-pkg/packagemanager.cc
parenta523cb7f26e0eae7df8e7ea4c386f954049480aa (diff)
eipp: implement version 0.1 of the protocol
The very first step in introducing the "external installation planer protocol" (short: EIPP) as part of my GSoC2016 project. The description reads: APT-based tools like apt-get, aptitude, synaptic, … work with the user to figure out how their system should look like after they are done installing/removing packages and their dependencies. The actual installation/removal of packages is done by dpkg with the constrain that dependencies must be fulfilled at any point in time (e.g. to run maintainer scripts). Historically APT has a super micro-management approach to this task which hasn't aged that well over the years mostly ignoring changes in dpkg and growing into an unmaintainable mess hardly anyone can debug and everyone fears to touch – especially as more and more requirements are tacked onto it like handling cycles and triggers, dealing with "important" packages first, package sources on removable media, touch minimal groups to be able to interrupt the process if needed (e.g. unattended-upgrades) which not only sky-rocket complexity but also can be mutually exclusive as you e.g. can't have minimal groups and minimal trigger executions at the same time.
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 77a6b0e57..8f884eac6 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -19,6 +19,7 @@
#include <apt-pkg/orderlist.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/edsp.h>
#include <apt-pkg/version.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/algorithms.h>
@@ -1036,6 +1037,11 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
if (Debug == true)
clog << "Beginning to order" << endl;
+ std::string const planer = _config->Find("APT::Planer", "internal");
+ if (planer != "internal")
+ if (EIPP::OrderInstall(planer.c_str(), Cache, 0, nullptr) == false)
+ return Failed;
+
bool const ordering =
_config->FindB("PackageManager::UnpackAll",true) ?
List->OrderUnpack(FileNames) : List->OrderCritical();