diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-01-17 22:49:50 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-01-17 22:49:50 +0000 |
commit | abb6ec58462064d9874945efb8215e1b6cd76d71 (patch) | |
tree | 2d2406b1c3ebc65db0beb28895083fe32df5e073 | |
parent | 48cb0bc9f3e2d13813f325964793e0944eb6e549 (diff) | |
download | anaconda-abb6ec58462064d9874945efb8215e1b6cd76d71.tar.gz anaconda-abb6ec58462064d9874945efb8215e1b6cd76d71.tar.xz anaconda-abb6ec58462064d9874945efb8215e1b6cd76d71.zip |
2007-01-17 Jeremy Katz <katzj@redhat.com>
* iw/progress_gui.py (InstallProgressWindow.completePackage):
Quick and dirty way of handling-non rpm installs. This needs to
be reworked more completely
* timezone.py (Timezone.__init__): Add a default in case the step
is skipped
* instdata.py (InstallData.write): Ensure that network is written
out rather than counting on our backend to do so in its preinstall
* fsset.py (FileSystemType.isKernelFS): Add a method to determine
if we're an in-kernel pseudo-filesystem
(PsudoFileSystem.isKernelFS): And implement it
(FileSystemSet.umountFilesystems): Allow unmounting filesystems
without turning off swap.
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | fsset.py | 11 | ||||
-rw-r--r-- | instdata.py | 3 | ||||
-rw-r--r-- | iw/progress_gui.py | 6 | ||||
-rw-r--r-- | timezone.py | 2 |
5 files changed, 36 insertions, 4 deletions
@@ -1,3 +1,21 @@ +2007-01-17 Jeremy Katz <katzj@redhat.com> + + * iw/progress_gui.py (InstallProgressWindow.completePackage): + Quick and dirty way of handling-non rpm installs. This needs to + be reworked more completely + + * timezone.py (Timezone.__init__): Add a default in case the step + is skipped + + * instdata.py (InstallData.write): Ensure that network is written + out rather than counting on our backend to do so in its preinstall + + * fsset.py (FileSystemType.isKernelFS): Add a method to determine + if we're an in-kernel pseudo-filesystem + (PsudoFileSystem.isKernelFS): And implement it + (FileSystemSet.umountFilesystems): Allow unmounting filesystems + without turning off swap. + 2007-01-17 Dave Lehman <dlehman@redhat.com> * loader2/method.c (unpackCpioBall): new function to unpack a @@ -176,6 +176,10 @@ class FileSystemType: self.maxLabelChars = 16 self.packages = [] + def isKernelFS(self): + """Returns True if this is an in-kernel pseudo-filesystem.""" + return False + def mount(self, device, mountpoint, readOnly=0, bindMount=0, instroot=""): if not self.isMountable(): @@ -966,6 +970,9 @@ class PsudoFileSystem(FileSystemType): self.name = name self.supported = 0 + def isKernelFS(self): + return True + class ProcFileSystem(PsudoFileSystem): def __init__(self): PsudoFileSystem.__init__(self, "proc") @@ -1870,7 +1877,7 @@ MAILADDR root return ret - def umountFilesystems(self, instPath, ignoreErrors = 0): + def umountFilesystems(self, instPath, ignoreErrors = 0, swapoff = True): # XXX remove special case try: isys.umount(instPath + '/proc/bus/usb', removeDir = 0) @@ -1884,6 +1891,8 @@ MAILADDR root reverse.reverse() for entry in reverse: + if entry.mountpoint == "swap" and not swapoff: + continue entry.umount(instPath) class FileSystemSetEntry: diff --git a/instdata.py b/instdata.py index 62f9f01d2..3ca42210a 100644 --- a/instdata.py +++ b/instdata.py @@ -149,7 +149,8 @@ class InstallData: log.error("Would have run: %s", args) except RuntimeError, msg: log.error("Error running %s: %s", args, msg) - + + self.network.write (anaconda.rootPath) self.firewall.write (anaconda.rootPath) self.security.write (anaconda.rootPath) diff --git a/iw/progress_gui.py b/iw/progress_gui.py index e4497ab5c..7e3827263 100644 --- a/iw/progress_gui.py +++ b/iw/progress_gui.py @@ -80,7 +80,7 @@ class InstallProgressWindow (InstallWindow): self.progress.set_fraction (newval) self.processEvents() - def completePackage(self, header, timer): + def completePackage(self, header = None, timer = None, pct = None): def formatTime(amt): hours = amt / 60 / 60 amt = amt % (60 * 60) @@ -90,6 +90,10 @@ class InstallProgressWindow (InstallWindow): return "%01d:%02d:%02d" % (int(hours) ,int(min), int(secs)) + if pct: + self.totalProgress.set_fraction(pct) + return + self.numComplete = self.numComplete + 1 self.sizeComplete = self.sizeComplete + (header[rpm.RPMTAG_SIZE]/1024) diff --git a/timezone.py b/timezone.py index f5285db17..e38a6b06e 100644 --- a/timezone.py +++ b/timezone.py @@ -59,6 +59,6 @@ class Timezone: self.arc = asArc def __init__(self): - self.tz = None + self.tz = "America/New_York" self.utc = 0 self.arc = 0 |