// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.41 1999/07/26 17:46:07 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.42 1999/10/29 04:49:37 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
xstatus files into it. */
bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress)
{
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024);
+
Progress.OverallProgress(0,1,1,"Reading Package Lists");
string CacheFile = _config->FindFile("Dir::Cache::pkgcache");
string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache");
FileFd SCacheF(SCacheFile,FileFd::WriteEmpty);
FileFd CacheF(CacheFile,FileFd::WriteEmpty);
- DynamicMMap Map(CacheF,MMap::Public);
+ DynamicMMap Map(CacheF,MMap::Public,MapSize);
if (_error->PendingError() == true)
return false;
FileFd SCacheF(SCacheFile,FileFd::ReadOnly);
FileFd CacheF(CacheFile,FileFd::WriteEmpty);
- DynamicMMap Map(CacheF,MMap::Public);
+ DynamicMMap Map(CacheF,MMap::Public,MapSize);
if (_error->PendingError() == true)
return false;
creates a memory block and puts the cache in there. */
MMap *pkgMakeStatusCacheMem(pkgSourceList &List,OpProgress &Progress)
{
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024);
+
/* If the cache file is writeable this is just a wrapper for
MakeStatusCache */
string CacheFile = _config->FindFile("Dir::Cache::pkgcache");
// Rebuild the source and package caches
if (SrcOk == false)
{
- DynamicMMap *Map = new DynamicMMap(MMap::Public);
+ DynamicMMap *Map = new DynamicMMap(MMap::Public,MapSize);
if (_error->PendingError() == true)
{
delete Map;
// We use the source cache to generate the package cache
string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache");
FileFd SCacheF(SCacheFile,FileFd::ReadOnly);
- DynamicMMap *Map = new DynamicMMap(MMap::Public);
+ DynamicMMap *Map = new DynamicMMap(MMap::Public,MapSize);
if (_error->PendingError() == true)
{
delete Map;
work if the essential packages are not tar, gzip, libc, dpkg, bash or
anything that those packages depend on.
+dit(bf(Cache-Limit))
+APT uses a fixed size memory mapped cache file to store the 'available'
+information. This sets the size of that cache.
+
dit(bf(Get))
The Get subsection controls the bf(apt-get(8)) tool, please see its
documentation for more information about the options here.
-// $Id: apt.conf,v 1.40 1999/10/28 05:54:46 jgg Exp $
+// $Id: apt.conf,v 1.41 1999/10/29 04:49:37 jgg Exp $
/* This file is an index of all APT configuration directives. It should
NOT actually be used as a real config file, though it is a completely
valid file. Most of the options have sane default values, unless
Clean-Installed "true";
Immediate-Configure "true"; // DO NOT turn this off, see the man page
Force-LoopBreak "false"; // DO NOT turn this on, see the man page
+ Cache-Limit "4194304";
};
// Options for the downloading routines