[master 15/30] Use the new static method to get possible PE sizes

KosiehBarter installerbot-noreply at redhat.com
Thu Jul 16 12:00:39 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

Otherwise we would have to use libblockdev for that as blivet no longer provides
such code in its devicelibs module.
---
 anaconda.spec.in        | 2 +-
 pyanaconda/kickstart.py | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index a3f3f30..8474cbc 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -82,7 +82,7 @@ The anaconda package is a metapackage for the Anaconda installer.
 %package core
 Summary: Core of the Anaconda installer
 Requires: dnf >= %{dnfver}
-Requires: python-blivet >= 1:1.0
+Requires: python-blivet >= 1:1.0.1
 Requires: python-meh >= %{mehver}
 Requires: libreport-anaconda >= 2.0.21-1
 Requires: libselinux-python
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index abd36af..28d5be9 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -21,7 +21,8 @@
 from pyanaconda.errors import ScriptError, errorHandler
 from blivet.deviceaction import ActionCreateFormat, ActionDestroyFormat, ActionResizeDevice, ActionResizeFormat
 from blivet.devices import LUKSDevice
-from blivet.devicelibs.lvm import getPossiblePhysicalExtents, LVM_PE_SIZE, KNOWN_THPOOL_PROFILES
+from blivet.devices.lvm import LVMVolumeGroupDevice
+from blivet.devicelibs.lvm import LVM_PE_SIZE, KNOWN_THPOOL_PROFILES
 from blivet.devicelibs.crypto import MIN_CREATE_ENTROPY
 from blivet.formats import getFormat
 from blivet.partitioning import doPartitioning
@@ -1723,7 +1724,7 @@ def execute(self, storage, ksdata, instClass):
             self.pesize = LVM_PE_SIZE.convertTo(KiB)
 
         pesize = Size("%d KiB" % self.pesize)
-        possible_extents = getPossiblePhysicalExtents()
+        possible_extents = LVMVolumeGroupDevice.get_supported_pe_sizes()
         if pesize not in possible_extents:
             raise KickstartValueError(formatErrorMsg(self.lineno,
                     msg=_("Volume group given physical extent size of \"%(extentSize)s\", but must be one of:\n%(validExtentSizes)s.") %


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/98ddca9a8b67a7483919946feb839f4c1a8262ef


More information about the anaconda-patches mailing list