Re: [PATCH 1/2] Ask about disk initialization only in storageinit step.

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

 



On Wed, 2010-01-06 at 13:44 +0100, Radek Vykydal wrote:
> Don't ask again and again e.g. when going back and forth in custom partitioning
> UI. Related to bug #527711 which is itself fixed by another patch.
> (*) Answers are cached in InstallInterface classes.
> (*) Dialog callback is moved from storage code to InstallInterface
>     classes.

The approach is good. Comments inline...

> ---
>  cmdline.py            |   10 +++++++++
>  gui.py                |   37 ++++++++++++++++++++++++++++++++++
>  storage/__init__.py   |    3 ++
>  storage/devicetree.py |   53 ++++++++++++++----------------------------------
>  text.py               |   37 ++++++++++++++++++++++++++++++++++
>  5 files changed, 103 insertions(+), 37 deletions(-)

> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index 6c956fc..f93e44f 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -1364,8 +1329,22 @@ class DeviceTree(object):
>          if self.zeroMbr:
>              initcb = lambda: True
>          else:
> -            initcb = lambda: questionInitializeDisk(self.intf, device.path,
> -                                                    device.description)
> +            # TODO RV is this check still necessary?
> +            if device.path.startswith('/dev/'):
> +                path = device.path
> +            else:
> +                path = '/dev/' + device.path

This is not necessary -- if we have StorageDevice instances with paths
that do not start with '/dev/' we're in trouble.

> +            description = device.description or device.model
> +            bypath = os.path.basename(deviceNameToDiskByPath(path))
> +            if bypath:
> +                details = "\n\nDevice details:\n%s" % (bypath,)
> +            else:
> +                datails = ""

Typo above. s/datails/details/

Looks good otherwise.

Dave

_______________________________________________
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