diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-21 02:42:21 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-21 02:42:21 +0000 |
commit | 8c1b5a5d9aaea7eea546358a3971d00bedec3f6a (patch) | |
tree | 5b2482c5c9e305068a1c050daced65c563964939 /fsset.py | |
parent | 72ac06ea4a04823417bac5776f807949e6ce8a7e (diff) | |
download | anaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.tar.gz anaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.tar.xz anaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.zip |
re-enabled the postaction on install classes, fixed the fsset support for disk switching (hard to test, broken packaging)
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -495,6 +495,32 @@ class FileSystemSet: entry.mountpoint, msg)) sys.exit(0) + def filesystemSpace(self, chroot='/'): + space = [] + # XXX limit to ext[23] etc? + for entry in self.entries: + if not entry.isMounted(): + continue + path = "%s/%s" % (chroot, entry.mountpoint) + try: + space.append((entry.mountpoint, isys.fsSpaceAvailable(path))) + except SystemError: + pass + + def spaceSort(a, b): + (m1, s1) = a + (m2, s2) = b + + if (s1 > s2): + return -1 + elif s1 < s2: + return 1 + + return 0 + + space.sort(spaceSort) + return space + def umountFilesystems(self, instPath, ignoreErrors = 0): # XXX remove special case try: |