summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeControler.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-10-04 20:06:55 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-10-04 20:06:55 +0200
commit6bc9ba7df538a541965d610490c19dd329496f53 (patch)
treee8c6ecdd3991c98ae1038de5e63c8f60de6a90af /DistUpgrade/DistUpgradeControler.py
parentbe3c5263985338a286e959add9fd618ba7f1d99e (diff)
downloadpython-apt-6bc9ba7df538a541965d610490c19dd329496f53.tar.gz
* DistUpgrade/DistUpgradeControler.py:
- log free diskspace
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
-rw-r--r--DistUpgrade/DistUpgradeControler.py12
1 files changed, 12 insertions, 0 deletions
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)