Re: [PATCH] Check if we'll clear a partition after setting its format attr. (#499251)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index e6c0614..3837b45 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -1176,9 +1176,7 @@ class DeviceTree(object):
>                  device = self.addUdevPartitionDevice(info)
>  
>          # now handle the device's formatting
> -        if not shouldClear(device, self.clearPartType, self.clearPartDisks,
> -                           self.protectedPartitions):
> -            self.handleUdevDeviceFormat(info, device)
> +        self.handleUdevDeviceFormat(info, device)
>  
>      def handleUdevLUKSFormat(self, info, device):
>          log_method_call(self, name=device.name, type=device.format.type)
> @@ -1506,6 +1504,12 @@ class DeviceTree(object):
>              device.format = None
>              return
>  
> +        if shouldClear(device, self.clearPartType, self.clearPartDisks,
> +                       self.protectedPartitions):
> +            # if this is a partition that will be cleared by clearpart,
> +            # don't bother with format-specific processing
> +            return
> +
>          #
>          # now do any special handling required for the device's format
>          #

I've already tested this one, and it does what we want.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux