diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:58 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:58 +0000 |
commit | d2685fd634b32f152748b7004c6810e946bbbcf2 (patch) | |
tree | 80816327fed2afb17d3e7a68de3e2b3be5b042a1 /apt-pkg | |
parent | 09f2e0262915c93c8cf062a52b809d207d016107 (diff) |
Two little bug fixes
Author: jgg
Date: 1998-12-06 03:41:25 GMT
Two little bug fixes
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/algorithms.cc | 9 | ||||
-rw-r--r-- | apt-pkg/depcache.cc | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 6328a20eb..8dadb933a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.12 1998/11/23 07:02:58 jgg Exp $ +// $Id: algorithms.cc,v 1.13 1998/12/06 03:41:25 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -453,8 +453,12 @@ void pkgProblemResolver::MakeScores() /* Protected things are pushed really high up. This number should put them ahead of everything */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) + { if ((Flags[I->ID] & Protected) != 0) Scores[I->ID] += 10000; + if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) + Scores[I->ID] += 5000; + } delete [] OldScores; } @@ -694,7 +698,8 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) // Hm, the group is broken.. I have no idea how to handle this if (Start != End) { - clog << "Note, a broken or group was found in " << I.Name() << "." << endl; + if (Debug == true) + clog << "Note, a broken or group was found in " << I.Name() << "." << endl; Cache.MarkDelete(I); break; } diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index b3a70d239..4fb26b777 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.cc,v 1.7 1998/11/23 07:02:59 jgg Exp $ +// $Id: depcache.cc,v 1.8 1998/12/06 03:41:26 jgg Exp $ /* ###################################################################### Dependency Cache - Caches Dependency information. @@ -305,6 +305,7 @@ void pkgDepCache::BuildGroupOrs(VerIterator const &V) State = ~State; // Add to the group if we are within an or.. + State &= 0x7; Group |= State; State |= Group << 3; if ((D->CompareOp & Dep::Or) != Dep::Or) |