From 3d615484858169e6732ef4f236fd3f38d0083a89 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:08 +0000 Subject: More bugs fixes Author: jgg Date: 1998-12-10 04:22:45 GMT More bugs fixes --- cmdline/apt-cache.cc | 8 +++++++- cmdline/apt-get.cc | 8 +++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index b20227153..429c36a3d 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cache.cc,v 1.16 1998/12/07 00:34:22 jgg Exp $ +// $Id: apt-cache.cc,v 1.17 1998/12/10 04:22:48 jgg Exp $ /* ###################################################################### apt-cache - Manages the cache files @@ -498,6 +498,12 @@ int main(int argc,const char *argv[]) while (1) { + if (strcmp(CmdL.FileList[0],"add") == 0) + { + ShowHelp(); + break; + } + if (strcmp(CmdL.FileList[0],"add") == 0) { DoAdd(CmdL); diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index fbfaf7303..a17d0ce2f 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.28 1998/12/08 23:52:24 jgg Exp $ +// $Id: apt-get.cc,v 1.29 1998/12/10 04:22:51 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -208,6 +208,7 @@ void ShowDel(ostream &out,pkgDepCache &Dep) for (;I.end() != true; I++) if (Dep[I].Delete() == true) List += string(I.Name()) + " "; + ShowList(out,"The following packages will be REMOVED:",List); } /*}}}*/ @@ -958,7 +959,7 @@ bool DoCheck(CommandLine &CmdL) // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -int ShowHelp() +int ShowHelp(CommandLine &CmdL) { cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE << " compiled on " << __DATE__ << " " << __TIME__ << endl; @@ -1057,6 +1058,7 @@ int main(int argc,const char *argv[]) {"dselect-upgrade",&DoDSelectUpgrade}, {"clean",&DoClean}, {"check",&DoCheck}, + {"help",&ShowHelp}, {0,0}}; // Parse the command line and initialize the package library @@ -1071,7 +1073,7 @@ int main(int argc,const char *argv[]) // See if the help should be shown if (_config->FindB("help") == true || CmdL.FileSize() == 0) - return ShowHelp(); + return ShowHelp(CmdL); // Setup the output streams c0out.rdbuf(cout.rdbuf()); -- cgit v1.2.3-70-g09d2