[anaconda] Make anaconda changes necessary for libblockdev s390 plugin.

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Jun 1 13:12:22 UTC 2015


On Mon, Jun 01, 2015 at 02:18:59PM +0200, Vojtěch Trefný wrote:
> 
> 
> On 20.5.2015 04:30, Samantha N. Bueno wrote:
> >---
> >  pyanaconda/anaconda.py                      | 10 ++++++++++
> >  pyanaconda/ui/gui/spokes/advstorage/dasd.py |  9 +++++----
> >  pyanaconda/ui/gui/spokes/advstorage/zfcp.py | 11 ++++++-----
> >  pyanaconda/ui/gui/spokes/lib/dasdfmt.py     | 11 +++++------
> >  pyanaconda/ui/gui/spokes/storage.py         | 12 ++++++------
> >  pyanaconda/ui/tui/spokes/storage.py         | 17 +++++++++--------
> >  6 files changed, 41 insertions(+), 29 deletions(-)
> >
> >diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
> >index cb4138d..896aae7 100644
> >--- a/pyanaconda/anaconda.py
> >+++ b/pyanaconda/anaconda.py
> >@@ -167,11 +167,21 @@ class Anaconda(object):
> >      def storage(self):
> >          if not self._storage:
> >              import blivet
> >+            import blivet.arch
> >+            from gi.repository import BlockDev as blockdev
> >              self._storage = blivet.Blivet(ksdata=self.ksdata)
> >
> >              if self.instClass.defaultFS:
> >                  self._storage.setDefaultFSType(self.instClass.defaultFS)
> >
> >+            if blivet.arch.isS390():
> >+                # want to make sure s390 plugin is loaded
> >+                if "s390" not in blockdev.get_available_plugin_names():
> >+                    plugin = blockdev.PluginSpec()
> >+                    plugin.name = blockdev.Plugin.S390
> >+                    plugin.so_name = None
> >+                    blockdev.reinit([plugin], reload=False)
> >+
> >          return self._storage
> >
> >      def dumpState(self):
> >diff --git a/pyanaconda/ui/gui/spokes/advstorage/dasd.py b/pyanaconda/ui/gui/spokes/advstorage/dasd.py
> >index 88e1a01..61fe5e5 100644
> >--- a/pyanaconda/ui/gui/spokes/advstorage/dasd.py
> >+++ b/pyanaconda/ui/gui/spokes/advstorage/dasd.py
> >@@ -21,6 +21,7 @@
> >
> >  from pyanaconda.ui.gui import GUIObject
> >  from pyanaconda.ui.gui.utils import gtk_action_nowait
> >+from gi.repository import BlockDev as blockdev
> >
> >  from blivet.devicelibs.dasd import sanitize_dasd_dev_input, online_dasd
> 
> You forgot to remove import of blivet.devicelibs.dasd here.
> 
> I think the rest looks good. We should push this ASAP because we already
> have new blivet with s390 libblockdev plugin changes in rawhide and
> installation fails because we don't have these changes in Anaconda.

Yes, I forgot to do it last Friday; I'm going to push them in just a
few minutes. And thanks for catching the import error.
 
> V.
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches


More information about the anaconda-patches mailing list