diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-06-01 18:32:25 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-06-01 18:32:25 +0200 |
| commit | 7bf4bfc461af7803475cb484c4baf2644d7faf5a (patch) | |
| tree | 1fb40530b1fbde8388d46fc0c3ca2de7a3045249 /DistUpgrade | |
| parent | aacccf6280516ade960554a58d1050287841b55b (diff) | |
| download | python-apt-7bf4bfc461af7803475cb484c4baf2644d7faf5a.tar.gz | |
* add safety buffer
Diffstat (limited to 'DistUpgrade')
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 5 |
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 |
