Improved error messages
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:56 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:56 +0000 (16:53 +0000)
Author: jgg
Date: 1999-06-04 02:31:37 GMT
Improved error messages

apt-pkg/algorithms.cc
cmdline/apt-get.cc
debian/changelog

index 991a612..505ba59 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/
index f745b18..ddf02a8 100644 (file)
@@ -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;
index b96b3a5..88f5247 100644 (file)
@@ -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 <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700