diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-05-08 17:46:31 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-05-08 17:46:31 +0200 |
commit | dec5b117052b77e4366efd8234e0cec09989b700 (patch) | |
tree | 71ded1f485c8f63841041fded68ec44109798828 | |
parent | 1dea08eb2e1115b8da14cc3da02d53f8e069ba14 (diff) |
* apt-pkg/algorithms.cc:
- Do not propagate negative scores from rdepends. Propagating the absolute
value of a negative score may boost obsolete packages and keep them
installed instead of installing their successors. (Closes: #699759)
-rw-r--r-- | apt-pkg/algorithms.cc | 5 | ||||
-rw-r--r-- | debian/changelog | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 8cd9d4c6e..991d425e3 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -645,7 +645,10 @@ void pkgProblemResolver::MakeScores() D->Type != pkgCache::Dep::Recommends)) continue; - Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]); + // Do not propagate negative scores otherwise + // an extra (-2) package might score better than an optional (-1) + if (OldScores[D.ParentPkg()->ID] > 0) + Scores[I->ID] += OldScores[D.ParentPkg()->ID]; } } diff --git a/debian/changelog b/debian/changelog index db7a8ffda..7775c1b79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,13 @@ apt (0.9.7.9) UNRELEASED; urgency=low * properly handle if-modfied-since with libcurl/https (closes: #705648) - -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 08 May 2013 16:20:13 +0200 + [ Andreas Beckman ] + * apt-pkg/algorithms.cc: + - Do not propagate negative scores from rdepends. Propagating the absolute + value of a negative score may boost obsolete packages and keep them + installed instead of installing their successors. (Closes: #699759) + + -- Michael Vogt <mvo@debian.org> Wed, 08 May 2013 17:46:10 +0200 apt (0.9.7.8) unstable; urgency=criticial |