summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:29 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:29 +0000
commit3e3221bad5ad56ef36a2ca4f9f44949b042935b5 (patch)
tree95a4c70a5f8efb3eec0d10f34154c50a11caaebb /cmdline
parente331f6edcb86e6acb2888ec0721e55bf43e10bc2 (diff)
More informative essential warning
Author: jgg Date: 1998-11-14 03:32:26 GMT More informative essential warning
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 8fe41f545..c9c0a15f8 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.11 1998/11/14 01:39:48 jgg Exp $
+// $Id: apt-get.cc,v 1.12 1998/11/14 03:32:26 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -44,6 +44,7 @@
#include <termios.h>
#include <sys/ioctl.h>
#include <signal.h>
+#include <stdio.h>
/*}}}*/
ostream c0out;
@@ -295,13 +296,21 @@ void ShowEssential(ostream &out,pkgDepCache &Dep)
// Print out any essential package depenendents that are to be removed
for (pkgDepCache::DepIterator D = I.CurrentVer().DependsList(); D.end() == false; D++)
{
+ // Skip everything but depends
+ if (D->Type != pkgCache::Dep::PreDepends &&
+ D->Type != pkgCache::Dep::Depends)
+ continue;
+
pkgCache::PkgIterator P = D.SmartTargetPkg();
if (Dep[P].Delete() == true)
{
if (Added[P->ID] == true)
continue;
Added[P->ID] = true;
- List += string(P.Name()) + " ";
+
+ char S[300];
+ sprintf(S,"%s (due to %s) ",P.Name(),I.Name());
+ List += S;
}
}
}