From 4264ebebe1826781e5b863a13041a6972ace01db Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 27 Jun 2011 14:34:00 +0100 Subject: Initial commit from my GSoC project. Added a verification function (VerifyConfigure) to the configuration methods. --- apt-pkg/packagemanager.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg/packagemanager.h') diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 053b4dc13..070b9c04b 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -73,7 +73,9 @@ class pkgPackageManager : protected pkgCache::Namespace bool SmartUnPack(PkgIterator Pkg); bool SmartUnPack(PkgIterator Pkg, bool const Immediate); bool SmartRemove(PkgIterator Pkg); - bool EarlyRemove(PkgIterator Pkg); + bool EarlyRemove(PkgIterator Pkg); + bool VerifyAndConfigure(PkgIterator Pkg, pkgOrderList &OList); + bool VerifyConfigure(PkgIterator Pkg, pkgOrderList &OList); // The Actual installation implementation virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;}; -- cgit v1.2.3 From a6c8798a6390b5c3a0775f8914e1cff2795e4cc1 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 6 Jul 2011 22:13:59 +0100 Subject: Added a APT::Immediate-Configure-All option to enable imediate configuration for all packages. Began adding to the SmartUnpack method to prevent dependancy loops breaking apt. --- apt-pkg/packagemanager.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/packagemanager.h') diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 070b9c04b..dcc9dc2a2 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -48,6 +48,7 @@ class pkgPackageManager : protected pkgCache::Namespace pkgDepCache &Cache; pkgOrderList *List; bool Debug; + bool ImmConfigureAll; /** \brief saves packages dpkg let disappear -- cgit v1.2.3 From b684d8c7b15fbbebb149afac4e374b025c1b335e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 16 Jul 2011 22:10:52 +0100 Subject: Dont try to configure packages using SmartConfigure when not performing immediate configuration. --- apt-pkg/packagemanager.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/packagemanager.h') diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index dcc9dc2a2..d4a25e982 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -48,6 +48,7 @@ class pkgPackageManager : protected pkgCache::Namespace pkgDepCache &Cache; pkgOrderList *List; bool Debug; + bool NoImmConfigure; bool ImmConfigureAll; /** \brief saves packages dpkg let disappear -- cgit v1.2.3 From 590f1923121815b36ef889033c1c416a23cbe9a2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 27 Jul 2011 15:20:35 +0100 Subject: SmartConfigure and SmartUnPack have got smarter! The full descriptions of what they now do is in the apt-pkg/packagemanager.cc file. The short version is that they will both put the system in a state where there operation can be achived, this involves calling themselves and each other recursively. Because SmartConfigure can now configure a package and all its dependancies itself, there is no current need for DepAdd (at least in packagemanager.cc), SmartConfigure also performs the function of the short lived VerifyConfigure as it checks through all the dependancies before performing configuration. Another change is to use the ConfigureAll method in OrderInstall to clean up any packages left unconfigured during ImmConfigureAll. This is necessary to inprove the safety of ImmConfiguration and because of the new SIGINT functionality of dpkgpm.cc relies on no packages being left unconfigured between pairs of dpkg calls. While writing this commit log, I have realised that the SIGINT stuff is a prototype and not ready to be used yet as I have only tested it twice. --- apt-pkg/packagemanager.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apt-pkg/packagemanager.h') diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index d4a25e982..e1878ce46 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -42,6 +42,7 @@ class pkgPackageManager : protected pkgCache::Namespace public: enum OrderResult {Completed,Failed,Incomplete}; + static bool SigINTStop; protected: string *FileNames; @@ -59,7 +60,6 @@ class pkgPackageManager : protected pkgCache::Namespace */ std::set disappearedPkgs; - bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0); void ImmediateAdd(PkgIterator P, bool UseInstallVer, unsigned const int &Depth = 0); virtual OrderResult OrderInstall(); bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver); @@ -76,8 +76,6 @@ class pkgPackageManager : protected pkgCache::Namespace bool SmartUnPack(PkgIterator Pkg, bool const Immediate); bool SmartRemove(PkgIterator Pkg); bool EarlyRemove(PkgIterator Pkg); - bool VerifyAndConfigure(PkgIterator Pkg, pkgOrderList &OList); - bool VerifyConfigure(PkgIterator Pkg, pkgOrderList &OList); // The Actual installation implementation virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;}; -- cgit v1.2.3 From d41d0e0113208aa1752344a13e8a962a1ad4f76e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 15 Aug 2011 22:31:09 +0100 Subject: Fixed a bug where SmartUnPack would be called with Immediate=true (to resolve dependancies in SmartConfigure) yet Pkg would not be immediately configured. This was because SmartUnPack still required the immediate flag to be set on Pkg. Also inproved the debuging adding indented output for SmartUnPack and SmartConfigure and specifying in the output if SmartConfigure or SmartUnPack was called just to Correct something (PkgLoop = true) or not. --- apt-pkg/packagemanager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/packagemanager.h') diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index e1878ce46..96dc5f236 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -70,10 +70,10 @@ class pkgPackageManager : protected pkgCache::Namespace // Install helpers bool ConfigureAll(); - bool SmartConfigure(PkgIterator Pkg); + bool SmartConfigure(PkgIterator Pkg, int const Depth); //FIXME: merge on abi break bool SmartUnPack(PkgIterator Pkg); - bool SmartUnPack(PkgIterator Pkg, bool const Immediate); + bool SmartUnPack(PkgIterator Pkg, bool const Immediate, int const Depth); bool SmartRemove(PkgIterator Pkg); bool EarlyRemove(PkgIterator Pkg); -- cgit v1.2.3