Re: [PATCH] Setup the disks before partitioning as the nodes are needed.

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

 



On Thu, 2009-04-09 at 16:49 +0200, Joel Granados Moreno wrote:
> ---
>  storage/__init__.py     |    6 ++++++
>  storage/partitioning.py |    4 ++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/__init__.py b/storage/__init__.py
> index 4f99fea..e059ebe 100644
> --- a/storage/__init__.py
> +++ b/storage/__init__.py
> @@ -163,6 +163,12 @@ def storageComplete(anaconda):
>                                  custom_buttons=[_("Go _back"),
>                                                  _("_Write changes to disk")],
>                                  default = 0)
> +
> +    # Make sure that all is down, even the disks that we setup after popluate.
> +    for disk in anaconda.id.storage.disks:
> +        if hasattr(disk, "teardown"):
> +            disk.teardown()
> +

Every Device must have a setup and a teardown method, whether or not
they do anything specific to the device type. This is one of the most
basic aspects of the Device class hierarchy. This hasattr stuff is
completely unnecessary. Likewise below.

>      if rc == 0:
>          return DISPATCH_BACK
>  
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index 5fba2e1..16a4a33 100644
> --- a/storage/partitioning.py
> +++ b/storage/partitioning.py
> @@ -542,6 +542,10 @@ def doPartitioning(storage, exclusiveDisks=None):
>      if exclusiveDisks:
>          disks = [d for d in disks if d.name in exclusiveDisks]
>  
> +    for disk in disks:
> +        if hasattr(disk, "setup"):
> +            disk.setup()
> +
>      partitions = storage.partitions
>      for part in partitions:
>          part.req_bootable = False

_______________________________________________
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