From be9b62f76406cf2546d21f3ca27587ee20e0fc37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Feb 2011 22:30:45 +0100 Subject: add more dpointer placeholders --- apt-pkg/algorithms.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index cf4a98c4f..42945a6f2 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -78,6 +78,9 @@ private: /*}}}*/ class pkgProblemResolver /*{{{*/ { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + pkgDepCache &Cache; typedef pkgCache::PkgIterator PkgIterator; typedef pkgCache::VerIterator VerIterator; -- cgit v1.2.3 From 6d38011bb93451dd9da3294614d821c77ac91687 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 30 Mar 2011 17:23:43 +0200 Subject: add a first round of stuff needed for talking between APT and solvers based on a very early draft for EDSP by Stefano APT can now write a scenario as well as load most stuff from it. --- apt-pkg/algorithms.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index ebe31cc10..0778ec722 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -105,6 +105,8 @@ class pkgProblemResolver /*{{{*/ void MakeScores(); bool DoUpgrade(pkgCache::PkgIterator Pkg); + + bool ResolveInternal(bool const BrokenFix = false); public: -- cgit v1.2.3 From 741b7da9de1d2ab470728f1e7f38b25e0d6a556c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 3 May 2011 10:50:25 +0200 Subject: implement external solver calling for upgrade and dist-upgrade, too --- apt-pkg/algorithms.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 0778ec722..582cbc527 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -107,6 +107,7 @@ class pkgProblemResolver /*{{{*/ bool DoUpgrade(pkgCache::PkgIterator Pkg); bool ResolveInternal(bool const BrokenFix = false); + bool ResolveByKeepInternal(); public: -- cgit v1.2.3 From 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 13:31:29 +0200 Subject: do not pollute namespace in the headers with using (Closes: #500198) --- apt-pkg/algorithms.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 86d5fbd53..f299f8189 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -37,8 +37,6 @@ #include -using std::ostream; - class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: @@ -63,13 +61,13 @@ class pkgSimulate : public pkgPackageManager /*{{{*/ pkgDepCache::ActionGroup group; // The Actuall installation implementation - virtual bool Install(PkgIterator Pkg,string File); + virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge); private: void ShortBreaks(); - void Describe(PkgIterator iPkg,ostream &out,bool Current,bool Candidate); + void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate); public: -- cgit v1.2.3 From 472ff00ef2e48383805d281c6364ec27839e3f4d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 19:14:19 +0200 Subject: use forward declaration in headers if possible instead of includes --- apt-pkg/algorithms.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index f299f8189..948fe1103 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -33,10 +33,11 @@ #include #include -#include #include +class pkgAcquireStatus; + class pkgSimulate : public pkgPackageManager /*{{{*/ { protected: -- cgit v1.2.3 From a4f6bdc8bd91c7282ae9ac60c44844c6f0058a65 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Dec 2011 00:54:37 +0100 Subject: revert 2184.1.2: do not pollute namespace in headers The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users --- apt-pkg/algorithms.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 948fe1103..fdb64fc59 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -36,6 +36,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +using std::ostream; +#endif + class pkgAcquireStatus; class pkgSimulate : public pkgPackageManager /*{{{*/ -- cgit v1.2.3 From b9dadc24b9477b466bc8058c765d76c65ecc7125 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Dec 2011 01:22:38 +0100 Subject: revert 2184.1.3: forward declaration instead of headers The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users --- apt-pkg/algorithms.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index fdb64fc59..185d11e96 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -37,6 +37,7 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include using std::ostream; #endif -- cgit v1.2.3 From d0f2c87cd7e4c0457d83ada4f27c2442dff2ef5c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 29 Jan 2012 14:47:34 +0100 Subject: * apt-pkg/algorithms.cc: - use a signed int instead of short for score calculation as upgrades become so big now that it can overflow (Closes: #657732, LP: #917173) --- apt-pkg/algorithms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/algorithms.h') diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 185d11e96..37eacf1f8 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -96,7 +96,7 @@ class pkgProblemResolver /*{{{*/ enum Flags {Protected = (1 << 0), PreInstalled = (1 << 1), Upgradable = (1 << 2), ReInstateTried = (1 << 3), ToRemove = (1 << 4)}; - signed short *Scores; + int *Scores; unsigned char *Flags; bool Debug; -- cgit v1.2.3