summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-23 03:12:16 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-23 03:12:16 +0000
commit05405863ee85cda7cba38d6a124ea9c2c06efe3b (patch)
tree6e0c3455b94f32d3e9585045d5221431e507dabe
parentc2466437193887d7070368b628535302c8f5e44e (diff)
downloadanaconda-05405863ee85cda7cba38d6a124ea9c2c06efe3b.tar.gz
anaconda-05405863ee85cda7cba38d6a124ea9c2c06efe3b.tar.xz
anaconda-05405863ee85cda7cba38d6a124ea9c2c06efe3b.zip
move definitions of CLEARPART_TYPE_* to partitioning.py to avoid circular
import madness and fix everywhere that refers to the CLEARPART_TYPE_* to ensure that they import from partitioning and don't try to do so from autopart
-rw-r--r--autopart.py4
-rw-r--r--installclass.py2
-rw-r--r--installclasses/server.py3
-rw-r--r--installclasses/workstation.py3
-rw-r--r--iw/partition_gui.py1
-rw-r--r--partitioning.py8
6 files changed, 7 insertions, 14 deletions
diff --git a/autopart.py b/autopart.py
index 0a0ce47c5..2d9494a1f 100644
--- a/autopart.py
+++ b/autopart.py
@@ -24,10 +24,6 @@ from translate import _, N_
PARTITION_FAIL = -1
PARTITION_SUCCESS = 0
-CLEARPART_TYPE_LINUX = 1
-CLEARPART_TYPE_ALL = 2
-CLEARPART_TYPE_NONE = 3
-
BOOT_ABOVE_1024 = -1
BOOTEFI_NOT_VFAT = -2
diff --git a/installclass.py b/installclass.py
index d2c72cb73..99b4461b1 100644
--- a/installclass.py
+++ b/installclass.py
@@ -9,7 +9,7 @@ import string
from xf86config import XF86Config
from translate import _
from instdata import InstallData
-from autopart import *
+from partitioning import *
class BaseInstallClass:
# default to not being hidden
diff --git a/installclasses/server.py b/installclasses/server.py
index b9ca9f421..32575ae0e 100644
--- a/installclasses/server.py
+++ b/installclasses/server.py
@@ -3,9 +3,6 @@ from translate import *
import os
import iutil
from partitioning import *
-from autopart import CLEARPART_TYPE_LINUX
-from autopart import CLEARPART_TYPE_ALL
-from autopart import CLEARPART_TYPE_NONE
class InstallClass(BaseInstallClass):
diff --git a/installclasses/workstation.py b/installclasses/workstation.py
index 5f4cff19b..df1249eb3 100644
--- a/installclasses/workstation.py
+++ b/installclasses/workstation.py
@@ -4,9 +4,6 @@ import os
import iutil
from partitioning import *
from fsset import *
-from autopart import CLEARPART_TYPE_LINUX
-from autopart import CLEARPART_TYPE_ALL
-from autopart import CLEARPART_TYPE_NONE
class InstallClass(BaseInstallClass):
name = N_("Workstation")
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 727ca7f41..dfaecc752 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -22,7 +22,6 @@ from translate import _, N_
from partitioning import *
from fsset import *
from autopart import doPartitioning, queryAutoPartitionOK
-from autopart import CLEARPART_TYPE_LINUX, CLEARPART_TYPE_ALL, CLEARPART_TYPE_NONE
from autopart import CLEARPART_TYPE_LINUX_DESCR_TEXT, CLEARPART_TYPE_ALL_DESCR_TEXT, CLEARPART_TYPE_NONE_DESCR_TEXT
from autopart import AUTOPART_DISK_CHOICE_DESCR_TEXT
from xpms_gui import CHECKBOX_ON_XPM
diff --git a/partitioning.py b/partitioning.py
index 217589ceb..249fc8839 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -45,6 +45,11 @@ REQUEST_NEW = 2
REQUEST_RAID = 4
REQUEST_PROTECTED = 8
+# when clearing partitions, what do we clear
+CLEARPART_TYPE_LINUX = 1
+CLEARPART_TYPE_ALL = 2
+CLEARPART_TYPE_NONE = 3
+
fsTypes = {}
fs_type = parted.file_system_type_get_next ()
@@ -719,7 +724,7 @@ class Partitions:
# CLEARPART_TYPE_LINUX, CLEARPART_TYPE_ALL, CLEARPART_TYPE_NONE
# used by installclasses to say which partitions to clear
- self.autoClearPartType = None
+ self.autoClearPartType = CLEARPART_TYPE_NONE
# drives to clear partitions on (following self.autoClearPartType)
# note that None clears ALL drives
@@ -919,7 +924,6 @@ class Partitions:
new.useFdisk = self.useFdisk
new.reinitializeDisks = self.reinitializeDisks
return new
-
class DiskSet:
skippedDisks = []