diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-04 20:06:55 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-04 20:06:55 +0200 |
| commit | 6bc9ba7df538a541965d610490c19dd329496f53 (patch) | |
| tree | e8c6ecdd3991c98ae1038de5e63c8f60de6a90af /DistUpgrade | |
| parent | be3c5263985338a286e959add9fd618ba7f1d99e (diff) | |
| download | python-apt-6bc9ba7df538a541965d610490c19dd329496f53.tar.gz | |
* DistUpgrade/DistUpgradeControler.py:
- log free diskspace
Diffstat (limited to 'DistUpgrade')
| -rw-r--r-- | DistUpgrade/Changelog | 2 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 5f7ba584..bfd8d4bd 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -1,3 +1,5 @@ +2006-10-04: + - improve the space checking/logging 2006-09-29: - typo fix (thanks to Jane Silber) (lp: #62946) 2006-09-28: diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 1f948d1f..7b35f3c8 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -372,6 +372,18 @@ class DistUpgradeControler(object): "packages of former installations using " "'sudo apt-get clean'.") + # gather/log some staticts + mnt_map = {} + for d in ["/","/usr","/var","/boot"]: + st = os.statvfs(d) + free = st[statvfs.F_BAVAIL]*st[statvfs.F_FRSIZE] + if st in mnt_map: + logging.debug("Dir %s mounted on %s" % (d,mnt_map[st])) + else: + logging.debug("Free space on %s: %s" % (d,free)) + mnt_map[st] = d + del mnt_map + # first check for /var (or where the archives are downloaded too) archivedir = apt_pkg.Config.FindDir("Dir::Cache::archives") st_archivedir = os.statvfs(archivedir) |
