~jr/ubuntu/oneiric/apt/bzr-get-rename

« back to all changes in this revision

Viewing changes to cmdline/apt-config.cc

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- mode: cpp; mode: fold -*-
2
2
// Description                                                          /*{{{*/
3
 
// $Id: apt-config.cc,v 1.7 2001/02/20 07:03:17 jgg Exp $
 
3
// $Id: apt-config.cc,v 1.11 2003/01/11 07:18:44 jgg Exp $
4
4
/* ######################################################################
5
5
   
6
6
   APT Config - Program to manipulate APT configuration files
23
23
 
24
24
#include <config.h>
25
25
#include <apti18n.h>
26
 
    
 
26
 
 
27
#include <locale.h>
27
28
#include <iostream>
28
29
#include <string>
29
30
                                                                        /*}}}*/
 
31
using namespace std;
30
32
 
31
33
// DoShell - Handle the shell command                                   /*{{{*/
32
34
// ---------------------------------------------------------------------
56
58
/* */
57
59
bool DoDump(CommandLine &CmdL)
58
60
{
59
 
   _config->Dump();
 
61
   _config->Dump(cout);
60
62
   return true;
61
63
}
62
64
                                                                        /*}}}*/
82
84
      "Options:\n"
83
85
      "  -h   This help text.\n" 
84
86
      "  -c=? Read this configuration file\n" 
85
 
      "  -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n");
 
87
      "  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n");
86
88
   return 0;
87
89
}
88
90
                                                                        /*}}}*/
98
100
   CommandLine::Dispatch Cmds[] = {{"shell",&DoShell},
99
101
                                   {"dump",&DoDump},
100
102
                                   {0,0}};
101
 
   
 
103
 
 
104
   // Set up gettext support
 
105
   setlocale(LC_ALL,"");
 
106
   textdomain(PACKAGE);
 
107
 
102
108
   // Parse the command line and initialize the package library
103
109
   CommandLine CmdL(Args,_config);
104
110
   if (pkgInitConfig(*_config) == false ||