summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-06-01 18:32:25 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-06-01 18:32:25 +0200
commit7bf4bfc461af7803475cb484c4baf2644d7faf5a (patch)
tree1fb40530b1fbde8388d46fc0c3ca2de7a3045249 /DistUpgrade
parentaacccf6280516ade960554a58d1050287841b55b (diff)
downloadpython-apt-7bf4bfc461af7803475cb484c4baf2644d7faf5a.tar.gz
* add safety buffer
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeControler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 2554340b..10234667 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -299,8 +299,9 @@ class DistUpgradeControler(object):
free = st_usr[statvfs.F_BAVAIL]*st_usr[statvfs.F_FRSIZE]
logging.debug("/usr on different fs than %s, free: %s" % (archivedir, free))
- if self.cache.additionalRequiredSpace > free:
- free_at_least = apt_pkg.SizeToStr(self.cache.additionalRequiredSpace-free)
+ safety_buffer = 1024*1024*75 # 75 Mb
+ if (self.cache.additionalRequiredSpace+safety_buffer) > free:
+ free_at_least = apt_pkg.SizeToStr(self.cache.additionalRequiredSpace+safety_buffer-free)
logging.error("not enough free space, we need addional %s" % free_at_least)
self._view.error(err_sum, err_long % (free_at_least,dir))
return False