FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-03-2008, 03:12 PM
Jeremy Katz
 
Default Add a basic method for checking the minimal size needed for a backend

Add a basic way to query a backend for how much space is needed on a
per-partition basis. This isn't always able to be known and if it's
unknown, then you'll get back 0. Add the implementation for / on
livecd
---
backend.py | 4 ++++
livecd.py | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/backend.py b/backend.py
index ad0285e..3008671 100644
--- a/backend.py
+++ b/backend.py
@@ -188,6 +188,10 @@ class AnacondaBackend:
def kernelVersionList(self, rootPath="/"):
return []

+ def getMinimumSizeMB(self, part):
+ """Return the minimal size for part in megabytes if we can."""
+ return 0
+
def doBackendSetup(self, anaconda):
log.warning("doBackendSetup not implemented for backend!")
raise NotImplementedError
diff --git a/livecd.py b/livecd.py
index f3afc20..5d7d3f7 100644
--- a/livecd.py
+++ b/livecd.py
@@ -366,6 +366,11 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
def kernelVersionList(self, rootPath = "/"):
return packages.rpmKernelVersionList(rootPath)

+ def getMinimumSizeMB(self, part):
+ if part == "/":
+ return self._getLiveSizeMB()
+ return 0
+
def doBackendSetup(self, anaconda):
# ensure there's enough space on the rootfs
# FIXME: really, this should be in the general sanity checking, but
--
1.6.0.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org