These are all pretty simple patches that fix bugs. Patch 3 is BS but we've supported it in the past so we're stuck with it.
--- blivet/devices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py index 3b567ec..6650086 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -2828,8 +2828,8 @@ class LVMThinPoolDevice(LVMLogicalVolumeDevice): maxsize=maxsize, percent=percent)
- self.metaDataSize = metadatasize - self.chunkSize = chunksize + self.metaDataSize = metadatasize or 0 + self.chunkSize = chunksize or 0 self._lvs = []
def _addLogVol(self, lv):
--- blivet/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/blivet/__init__.py b/blivet/__init__.py index 2c2714a..0558262 100644 --- a/blivet/__init__.py +++ b/blivet/__init__.py @@ -1946,11 +1946,20 @@ class Blivet(object): # make sure the roots reference devices in self.devicetree._devices for root in new.roots: root.swaps = [new.devicetree.getDeviceByID(d.id) for d in root.swaps] + # the above will put None in the list if the swap has since been + # removed, which is problematic + root.swaps = [s for s in root.swaps if s] + for (mountpoint, old_dev) in root.mounts.items(): if old_dev is None: continue
new_dev = new.devicetree.getDeviceByID(old_dev.id) + if new_dev is None: + # if the device has been removed don't include this + # mountpoint at all + continue + root.mounts[mountpoint] = new_dev
log.debug("finished Blivet copy")
Resolves: rhbz#984826 --- blivet/devicetree.py | 19 ++++++++++++++++--- blivet/partitioning.py | 3 --- 2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py index 2930c9d..39e756c 100644 --- a/blivet/devicetree.py +++ b/blivet/devicetree.py @@ -1921,11 +1921,24 @@ class DeviceTree(object):
self.teardownAll()
+ def _is_ignored(disk): + return ((self.ignoredDisks and disk.name in self.ignoredDisks) or + (self.exclusiveDisks and + disk.name not in self.exclusiveDisks)) + # hide any subtrees that begin with an ignored disk for disk in [d for d in self._devices if d.isDisk]: - if ((self.ignoredDisks and disk.name in self.ignoredDisks) or - (self.exclusiveDisks and disk.name not in self.exclusiveDisks)): - self.hide(disk) + if _is_ignored(disk): + ignored = True + # If the filter allows all members of a fwraid or mpath, the + # fwraid or mpath itself is implicitly allowed as well. I don't + # like this very much but we have supported this usage in the + # past, so I guess we will support it forever. + if disk.parents and all(p.format.hidden for p in disk.parents): + ignored = any(_is_ignored(d) for d in disk.parents) + + if ignored: + self.hide(disk)
def teardownAll(self): """ Run teardown methods on all devices. """ diff --git a/blivet/partitioning.py b/blivet/partitioning.py index 2a417ef..abaf1b3 100644 --- a/blivet/partitioning.py +++ b/blivet/partitioning.py @@ -750,9 +750,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()
On Fri, Sep 06, 2013 at 01:04:06PM -0500, David Lehman wrote:
These are all pretty simple patches that fix bugs. Patch 3 is BS but we've supported it in the past so we're stuck with it.
Ack to all of these.
anaconda-patches@lists.fedorahosted.org