From d2de5a7619a77343e1dd1fc255a84dfcca2807be Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 13 Dec 2006 19:19:11 +0100 Subject: * apt-pkg/algorithms.cc: - use clog instead of cout in debug --- apt-pkg/algorithms.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/algorithms.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 479927d65..8d1e4e8e8 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -784,7 +784,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) continue; if (Debug == true) - cout << "Investigating " << I.Name() << endl; + clog << "Investigating " << I.Name() << endl; // Isolate the problem dependency PackageKill KillList[100]; -- cgit v1.2.3 From 4172c78468a04078c97146dbc2e2979e63906f5b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 18 Dec 2006 19:39:42 +0100 Subject: * apt-pkg/algorithms.cc: - only increase the score of installed applications if they are not obsolte (still downloadable) --- apt-pkg/algorithms.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apt-pkg/algorithms.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 8d1e4e8e8..0d486d102 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -494,8 +494,10 @@ void pkgProblemResolver::MakeScores() Score += PrioMap[Cache[I].InstVerIter(Cache)->Priority]; /* This helps to fix oddball problems with conflicting packages - on the same level. We enhance the score of installed packages */ - if (I->CurrentVer != 0) + on the same level. We enhance the score of installed packages + if those are not obsolete + */ + if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) Score += 1; } -- cgit v1.2.3 From 4cc152f93acf2eaf3ae66424cd4aaf47cad14a7b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Dec 2006 20:44:54 +0100 Subject: * apt-pkg/algorithms.cc: - when encountering a or-group in pkgProblemResolver::Resolver(), check if it IsCritical(), otherwise we may do checking on weak-depends and confuse the system badly --- apt-pkg/algorithms.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/algorithms.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 0d486d102..e1b9406e2 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -841,7 +841,12 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) OldEnd = LEnd; } else + { Start++; + // We only worry about critical deps. + if (Start.IsCritical() != true) + continue; + } // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) -- cgit v1.2.3 From 020daa7b026cf1496959ccc9d062d95cb5f8ec02 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 20 Dec 2006 10:58:57 +0100 Subject: * apt-pkg/algorithms.cc: - make sure we have a candidateVer if we check it for downloadability --- apt-pkg/algorithms.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/algorithms.cc') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index e1b9406e2..5fa16e66f 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -497,7 +497,7 @@ void pkgProblemResolver::MakeScores() on the same level. We enhance the score of installed packages if those are not obsolete */ - if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) + if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) Score += 1; } -- cgit v1.2.3