diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:56 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:56 +0000 |
commit | b5dc97853ed1884269aa92a98f9f1e37d5591a14 (patch) | |
tree | 7cb9281896334500efea317dae46ead263c22cfc /apt-pkg | |
parent | 27d6ee040ee1f13a6dc9afa64363b34c22ef3313 (diff) |
Improved error messages
Author: jgg
Date: 1999-06-04 02:31:37 GMT
Improved error messages
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/algorithms.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 991a61228..505ba59f7 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.17 1999/04/28 22:48:45 jgg Exp $ +// $Id: algorithms.cc,v 1.18 1999/06/04 02:31:37 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -776,7 +776,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) Scores[I->ID] = Scores[Pkg->ID]; } } - + Change = true; Done = true; break; @@ -856,8 +856,19 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) delete [] PList; if (Cache.BrokenCount() != 0) - return _error->Error("Internal error, pkgProblemResolver::Resolve generated breaks."); - + { + // See if this is the result of a hold + pkgCache::PkgIterator I = Cache.PkgBegin(); + for (;I.end() != true; I++) + { + if (Cache[I].InstBroken() == false) + continue; + if ((Flags[I->ID] & Protected) != Protected) + return _error->Error("Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."); + } + return _error->Error("Unable to correct problems, you have held broken packages."); + } + return true; } /*}}}*/ |