From b5dc97853ed1884269aa92a98f9f1e37d5591a14 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:53:56 +0000 Subject: Improved error messages Author: jgg Date: 1999-06-04 02:31:37 GMT Improved error messages --- apt-pkg/algorithms.cc | 19 +++++++++++++++---- cmdline/apt-get.cc | 8 ++++---- debian/changelog | 4 +++- 3 files changed, 22 insertions(+), 9 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; } /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index f745b18c2..ddf02a8f3 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.61 1999/05/24 03:39:37 jgg Exp $ +// $Id: apt-get.cc,v 1.62 1999/06/04 02:31:37 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -846,10 +846,10 @@ bool DoInstall(CommandLine &CmdL) packages */ if (BrokenFix == true && Cache->BrokenCount() != 0) { - c1out << "You might want to run `apt-get -f install' to correct these." << endl; + c1out << "You might want to run `apt-get -f install' to correct these:" << endl; ShowBroken(c1out,Cache); - return _error->Error("Unmet dependencies. Try using -f."); + return _error->Error("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)."); } // Call the scored problem resolver @@ -1344,7 +1344,7 @@ bool ShowHelp(CommandLine &CmdL) cout << " -f Attempt to continue if the integrity check fails" << endl; cout << " -m Attempt to continue if archives are unlocatable" << endl; cout << " -u Show a list of upgraded packages as well" << endl; - cout << " -b Bulid the source package after fetching itl" << endl; + cout << " -b Build the source package after fetching it" << endl; cout << " -c=? Read this configuration file" << endl; cout << " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" << endl; cout << "See the apt-get(8), sources.list(5) and apt.conf(5) manual" << endl; diff --git a/debian/changelog b/debian/changelog index b96b3a53c..88f524705 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ apt (0.3.6.1) unstable; urgency=low * Fixed missing text in the apt-get(8) page. Closes: #37596 * Made --simulate and friends work with apt-get source. Closes: #37597, #37656 - * Fixed inclusion of man pages in the -doc/-dev package. Closes: #37633 + * Fixed inclusion of man pages in the -doc/-dev package. Closes: #37633, #38651 * Fixed handling of the -q option with not-entirely integer arguments Closes: #37499 * Man page typo Closes: #37762 @@ -20,6 +20,8 @@ apt (0.3.6.1) unstable; urgency=low * Fix apt-cdrom chop handling and missing lines. Closes: #37276 * IPv6 http support * Suggests dpkg-dev for apt-get source. Closes: #38158 + * Fixed typo in apt-get help. Closes: #38712 + * Improved the error message in the case of broken held package. Closes: #38777 -- Jason Gunthorpe Wed, 12 May 1999 09:18:49 -0700 -- cgit v1.2.3