[PATCH atomic-rhel-7.1] rescue: find root partition of ostree (atomic) installations (#1152041)
Radek Vykydal
rvykydal at redhat.com
Wed Jan 21 09:55:53 UTC 2015
On 01/20/2015 03:45 PM, Anne Mulhern wrote:
>
>
>
> ----- Original Message -----
>> From: "Radek Vykydal" <rvykydal at redhat.com>
>> To: anaconda-patches at lists.fedorahosted.org
>> Sent: Monday, January 19, 2015 8:19:42 AM
>> Subject: [PATCH atomic-rhel-7.1] rescue: find root partition of ostree (atomic) installations (#1152041)
>>
>> This patch is targeted for RHEL Atomic Host 7.1 which is using 7.0 anaconda
>> plus patches in atomic-rhel-7.1 dist-git branch. So the patch should go to
>> rhel7-branch in 7.2 dev.
>>
>> ---
>> pyanaconda/rescue.py | 37 +++++++++++++++++++++++++++++++++++++
>> 1 file changed, 37 insertions(+)
>>
>> diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
>> index e0c4e13..fbf3f06 100644
>> --- a/pyanaconda/rescue.py
>> +++ b/pyanaconda/rescue.py
>> @@ -264,6 +264,42 @@ def _unlock_devices(intf, storage):
>> device.format.passphrase = None
>> try_passphrase = None
>>
>> +def findExistingOstreePartitions(devicetree):
>> + import blivet
>> + if not os.path.exists(blivet.getTargetPhysicalRoot()):
>> + util.makedirs(blivet.getTargetPhysicalRoot())
>> +
>> + roots = []
>> + for device in devicetree.leaves:
>> + if not device.format.linuxNative or not device.format.mountable or \
>> + not device.controllable:
>> + continue
>> +
>> + try:
>> + device.setup()
>> + except Exception: # pylint: disable=broad-except
>> + log.warning("setup of %s failed", [device.name])
> Why is device.name between list brackets?
>
Good question, result of copy&paste from blivet/__init__.py - we should
fix it there too probably.
I'll update the patch for rhel7-branch.
More information about the anaconda-patches
mailing list