~ubuntu-branches/ubuntu/breezy/apt/breezy

« back to all changes in this revision

Viewing changes to apt-pkg/cachefile.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: cachefile.cc,v 1.7 2001/07/01 20:49:08 jgg Exp $
 
3
// $Id: cachefile.cc,v 1.8 2002/04/27 04:28:04 jgg Exp $
4
4
/* ######################################################################
5
5
   
6
6
   CacheFile - Simple wrapper class for opening, generating and whatnot
46
46
   _system->UnLock(true);
47
47
}   
48
48
                                                                        /*}}}*/
49
 
// CacheFile::Open - Open the cache files, creating if necessary        /*{{{*/
 
49
// CacheFile::BuildCaches - Open and build the cache files              /*{{{*/
50
50
// ---------------------------------------------------------------------
51
51
/* */
52
 
bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
 
52
bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock)
53
53
{
54
54
   if (WithLock == true)
55
55
      if (_system->Lock() == false)
79
79
   Cache = new pkgCache(Map);
80
80
   if (_error->PendingError() == true)
81
81
      return false;
 
82
   return true;
 
83
}
 
84
                                                                        /*}}}*/
 
85
// CacheFile::Open - Open the cache files, creating if necessary        /*{{{*/
 
86
// ---------------------------------------------------------------------
 
87
/* */
 
88
bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
 
89
{
 
90
   if (BuildCaches(Progress,WithLock) == false)
 
91
      return false;
82
92
   
83
93
   // The policy engine
84
94
   Policy = new pkgPolicy(Cache);