[elbe-devel] [PATCH] Increase APT cache on demand

Benedikt Spranger b.spranger at linutronix.de
Mon Sep 30 11:22:20 CEST 2013


"elbe create example.xml" failed due to an out of room cache file.
Instead of simply increase the cache file set the startup cache size and
the cache grow. Also set the cache limit to unlimited.

$ elbe create example.xml
i386
Reading package lists... Done
Building dependency tree... Done
...
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start.
Current value: 32505856. (man 5 apt.conf)
Reading package lists... Error!
Failure to download kernel/initrd debian Package
Check your source URLs
$

Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
---
 elbepack/virtapt.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index 7e025c2..9a71892 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -39,7 +39,9 @@ class VirtApt:
                 apt_pkg.config.set ("APT::Architecture", arch)
                 apt_pkg.config.set ("APT::Install-Recommends", "0")
                 apt_pkg.config.set ("Dir", self.projectpath)
-                apt_pkg.config.set ("APT::Cache-Limit", "32505856")
+                apt_pkg.config.set ("APT::Cache-Limit", "0")
+                apt_pkg.config.set ("APT::Cache-Start", "32505856")
+                apt_pkg.config.set ("APT::Cache-Grow", "2097152")
                 apt_pkg.config.set ("Dir::State", "state")
                 apt_pkg.config.set ("Dir::State::status", "status")
                 apt_pkg.config.set ("Dir::Cache", "cache")
-- 
1.8.4.rc3





More information about the elbe-devel mailing list