summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DistUpgrade/Changelog2
-rw-r--r--DistUpgrade/DistUpgradeControler.py12
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)