blivet/devices.py | 14 ++++++++++++++ blivet/formats/luks.py | 5 ++++- blivet/partitioning.py | 3 --- 3 files changed, 18 insertions(+), 4 deletions(-)
Related: rhbz#984826 --- blivet/partitioning.py | 3 --- 1 file changed, 3 deletions(-)
diff --git a/blivet/partitioning.py b/blivet/partitioning.py index d0a1331..6d75551 100644 --- a/blivet/partitioning.py +++ b/blivet/partitioning.py @@ -724,9 +724,6 @@ def doPartitioning(storage):
""" disks = storage.partitioned - if storage.config.exclusiveDisks: - disks = [d for d in disks if d.name in storage.config.exclusiveDisks] - for disk in disks: try: disk.setup()
--- blivet/devices.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py index 4877a39..5772ec4 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -1531,6 +1531,20 @@ class PartitionDevice(StorageDevice): StorageDevice._postCreate(self) self._currentSize = self.partedPartition.getSize()
+ @exclusive + def create(self): + """ Create the device. """ + log_method_call(self, self.name, status=self.status) + self._preCreate() + try: + self._create() + except DiskLabelCommitError as e: + raise + except Exception as e: + raise DeviceCreateError(str(e), self.name) + else: + self._postCreate() + def _computeResize(self, partition): log_method_call(self, self.name, status=self.status)
On Tue, 2013-09-03 at 14:07 -0500, David Lehman wrote:
blivet/devices.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py index 4877a39..5772ec4 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -1531,6 +1531,20 @@ class PartitionDevice(StorageDevice): StorageDevice._postCreate(self) self._currentSize = self.partedPartition.getSize()
- @exclusive
- def create(self):
What does the 'exclusive' decorator do and where does it come from?
On Wed, 2013-09-04 at 08:34 +0200, Vratislav Podzimek wrote:
On Tue, 2013-09-03 at 14:07 -0500, David Lehman wrote:
blivet/devices.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py index 4877a39..5772ec4 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -1531,6 +1531,20 @@ class PartitionDevice(StorageDevice): StorageDevice._postCreate(self) self._currentSize = self.partedPartition.getSize()
- @exclusive
- def create(self):
What does the 'exclusive' decorator do and where does it come from?
Whoops. That's a relic from some other stuff I'm working on. (that's a locking-related decorator) That part won't be included when I push. Good catch -- thanks.
--- blivet/formats/luks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/blivet/formats/luks.py b/blivet/formats/luks.py index ab12eba..0c4b25b 100644 --- a/blivet/formats/luks.py +++ b/blivet/formats/luks.py @@ -33,6 +33,7 @@ from ..storage_log import log_method_call from ..errors import * from ..devicelibs import crypto from . import DeviceFormat, register_device_format +from ..flags import flags
import gettext _ = lambda x: gettext.ldgettext("blivet", x) @@ -200,7 +201,9 @@ class LUKS(DeviceFormat): else: self.uuid = crypto.luks_uuid(self.device) self.exists = True - self.mapName = "luks-%s" % self.uuid + if flags.installer_mode: + self.mapName = "luks-%s" % self.uuid + self.notifyKernel()
def destroy(self, *args, **kwargs):
On Tue, Sep 03, 2013 at 02:07:46PM -0500, David Lehman wrote:
blivet/devices.py | 14 ++++++++++++++ blivet/formats/luks.py | 5 ++++- blivet/partitioning.py | 3 --- 3 files changed, 18 insertions(+), 4 deletions(-)
Ack to these.
anaconda-patches@lists.fedorahosted.org