diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-10 23:47:02 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-10 23:47:02 +0000 |
commit | e8e51bea1d1b1c7b451bbcdbcd46ea4b6648d4a6 (patch) | |
tree | 4827cbc51fe1ef1f3155792902de997342326bff | |
parent | c17a74a82e71857fdb02d8d90df10b39fa4060d1 (diff) | |
download | anaconda-e8e51bea1d1b1c7b451bbcdbcd46ea4b6648d4a6.tar.gz anaconda-e8e51bea1d1b1c7b451bbcdbcd46ea4b6648d4a6.tar.xz anaconda-e8e51bea1d1b1c7b451bbcdbcd46ea4b6648d4a6.zip |
added proper inheritance for install methods
-rw-r--r-- | harddrive.py | 9 | ||||
-rw-r--r-- | installmethod.py | 22 | ||||
-rw-r--r-- | todo.py | 2 | ||||
-rw-r--r-- | urlinstall.py | 11 |
4 files changed, 31 insertions, 13 deletions
diff --git a/harddrive.py b/harddrive.py index 3cb6d2647..bd42722e4 100644 --- a/harddrive.py +++ b/harddrive.py @@ -1,6 +1,7 @@ # Install method for disk image installs (CD & NFS) from comps import ComponentSet, HeaderList +from installmethod import InstallMethod import os import isys import rpm @@ -10,7 +11,7 @@ import todo FILENAME = 1000000 -class InstallMethod: +class HardDriveInstallMethod(InstallMethod): def mountMedia(self): if (self.isMounted): @@ -66,16 +67,14 @@ class InstallMethod: self.umountMedia() return HeaderList(hl) - def targetFstab(self, fstab): + def systemMounted(self, fstab, mntPoint): self.mountMedia() def filesDone(self): self.umountMedia() - def unlinkFilename(self, fullName): - pass - def __init__(self, device, type, path): + InstallMethod.__init__(self) self.device = device self.path = path self.fstype = type diff --git a/installmethod.py b/installmethod.py new file mode 100644 index 000000000..2a832ab7b --- /dev/null +++ b/installmethod.py @@ -0,0 +1,22 @@ +class InstallMethod: + + def readComps(self, hdlist): + pass + + def getFilename(self, h): + pass + + def readHeaders(self): + pass + + def systemMounted(self, fstab, mntPoint): + pass + + def filesDone(self): + pass + + def unlinkFilename(self, fullName): + pass + + def __init__(self): + pass @@ -1136,7 +1136,7 @@ class ToDo: # flag this so we only do it once. self.dbpath = None - self.method.targetFstab (self.fstab) + self.method.systemMounted (self.fstab, self.instPath) if not self.installSystem: return diff --git a/urlinstall.py b/urlinstall.py index af5601e42..46479c6d7 100644 --- a/urlinstall.py +++ b/urlinstall.py @@ -1,6 +1,7 @@ # Install method for disk image installs (CD & NFS) from comps import ComponentSet, HeaderList +from installmethod import InstallMethod import os import rpm import time @@ -18,7 +19,7 @@ import todo FILENAME = 1000000 -class InstallMethod: +class UrlInstallMethod(InstallMethod): def readComps(self, hdlist): return ComponentSet(self.baseUrl + '/RedHat/base/comps', @@ -82,13 +83,9 @@ class InstallMethod: return HeaderList(hl) - def targetFstab(self, fstab): - pass - - def filesDone(self): - pass - def __init__(self, url): + InstallMethod.__init__(self) + i = string.index(url, '://') + 2 self.baseUrl = url[0:i] rem = url[i:] |