Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2020-07-30 10:00:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Thu Jul 30 10:00:29 2020 rev:451 rq:823388 version:4.3.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2020-07-27 17:36:27.890772547 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new.3592/yast2-installation.changes
  2020-07-30 10:00:53.171249364 +0200
@@ -1,0 +2,19 @@
+Mon Jul 27 17:04:26 CEST 2020 - sch...@suse.de
+
+- AY: Removed "image" section from "software" section
+  (bsc#1140711).
+- 4.3.13
+
+-------------------------------------------------------------------
+Mon Jul 27 13:43:29 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.12
+
+-------------------------------------------------------------------
+Mon Jul 27 08:14:24 UTC 2020 - Steffen Winterfeldt <snw...@suse.com>
+
+- handle device autoconfig setting in summary screen (bsc#1168036)
+- 4.3.11
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-4.3.10.tar.bz2

New:
----
  yast2-installation-4.3.13.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.GPhYgr/_old  2020-07-30 10:00:54.119249930 +0200
+++ /var/tmp/diff_new_pack.GPhYgr/_new  2020-07-30 10:00:54.123249933 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.3.10
+Version:        4.3.13
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -40,6 +40,8 @@
 BuildRequires:  yast2 >= 4.2.56
 # Y2Packager::MediumType
 BuildRequires:  yast2-packager >= 4.2.27
+# CIOIgnore
+BuildRequires:  yast2-bootloader
 # using /usr/bin/udevadm
 BuildRequires:  yast2-storage-ng >= 4.2.71
 # Y2Network::NtpServer
@@ -67,6 +69,8 @@
 Requires:       yast2-pkg-bindings >= 3.1.33
 # Y2Packager::MediumType
 Requires:       yast2-packager >= 4.2.22
+# CIOIgnore
+Requires:       yast2-bootloader
 # use in startup scripts
 Requires:       initviocons
 # Proxy settings for 2nd stage (bnc#764951)
@@ -179,7 +183,8 @@
 %postun
 %service_del_postun YaST2-Second-Stage.service YaST2-Firstboot.service
 
-%endif #suse_version
+#suse_version
+%endif
 
 %files
 

++++++ yast2-installation-4.3.10.tar.bz2 -> yast2-installation-4.3.13.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.3.10/control/test.xml 
new/yast2-installation-4.3.13/control/test.xml
--- old/yast2-installation-4.3.10/control/test.xml      2020-07-24 
12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/control/test.xml      2020-07-29 
14:08:57.000000000 +0200
@@ -431,10 +431,6 @@
                 </module>
                 <module>
                    <label>Perform Installation</label>
-                    <name>autoimage</name>
-                </module>
-                <module>
-                   <label>Perform Installation</label>
                     <name>rpmcopy</name>
                 </module>
                 <module>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/package/yast2-installation.changes 
new/yast2-installation-4.3.13/package/yast2-installation.changes
--- old/yast2-installation-4.3.10/package/yast2-installation.changes    
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/package/yast2-installation.changes    
2020-07-29 14:08:57.000000000 +0200
@@ -1,4 +1,23 @@
 -------------------------------------------------------------------
+Mon Jul 27 17:04:26 CEST 2020 - sch...@suse.de
+
+- AY: Removed "image" section from "software" section
+  (bsc#1140711).
+- 4.3.13
+
+-------------------------------------------------------------------
+Mon Jul 27 13:43:29 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.12
+
+-------------------------------------------------------------------
+Mon Jul 27 08:14:24 UTC 2020 - Steffen Winterfeldt <snw...@suse.com>
+
+- handle device autoconfig setting in summary screen (bsc#1168036)
+- 4.3.11
+
+-------------------------------------------------------------------
 Fri Jul 24 06:48:57 UTC 2020 - José Iván López González <jlo...@suse.com>
 
 - Configure the wizard layout according to the product features.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/package/yast2-installation.spec 
new/yast2-installation-4.3.13/package/yast2-installation.spec
--- old/yast2-installation-4.3.10/package/yast2-installation.spec       
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/package/yast2-installation.spec       
2020-07-29 14:08:57.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-installation
-Version:        4.3.10
+Version:        4.3.13
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only
@@ -39,6 +39,8 @@
 BuildRequires:  yast2 >= 4.2.56
 # Y2Packager::MediumType
 BuildRequires:  yast2-packager >= 4.2.27
+# CIOIgnore
+BuildRequires:  yast2-bootloader
 # using /usr/bin/udevadm
 BuildRequires:  yast2-storage-ng >= 4.2.71
 # Y2Network::NtpServer
@@ -66,6 +68,8 @@
 Requires:       yast2-pkg-bindings >= 3.1.33
 # Y2Packager::MediumType
 Requires:       yast2-packager >= 4.2.22
+# CIOIgnore
+Requires:       yast2-bootloader
 # use in startup scripts
 Requires:       initviocons
 # Proxy settings for 2nd stage (bnc#764951)
@@ -180,7 +184,8 @@
 %postun
 %service_del_postun YaST2-Second-Stage.service YaST2-Firstboot.service
 
-%endif #suse_version
+#suse_version
+%endif
 
 %files
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/src/clients/deploy_image_auto.rb 
new/yast2-installation-4.3.13/src/clients/deploy_image_auto.rb
--- old/yast2-installation-4.3.10/src/clients/deploy_image_auto.rb      
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/src/clients/deploy_image_auto.rb      
2020-07-29 14:08:57.000000000 +0200
@@ -1,2 +1,2 @@
 require "installation/clients/deploy_image_auto"
-Yast::DeployImageAutoClient.new.main
+Yast::DeployImageAutoClient.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/src/lib/installation/cio_ignore.rb 
new/yast2-installation-4.3.13/src/lib/installation/cio_ignore.rb
--- old/yast2-installation-4.3.10/src/lib/installation/cio_ignore.rb    
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/src/lib/installation/cio_ignore.rb    
2020-07-29 14:08:57.000000000 +0200
@@ -2,28 +2,24 @@
 
 module Installation
   class CIOIgnore
+    # FIXME
+    # The class name is a bit outdated now that it handles both cio_ignore
+    # and rd.zdev kernel parameters.
     include Singleton
+    include Yast::Logger
     Yast.import "Mode"
     Yast.import "AutoinstConfig"
 
-    attr_accessor :enabled
+    attr_accessor :cio_enabled
+    attr_accessor :autoconf_enabled
 
     def initialize
       reset
     end
 
     def reset
-      @enabled = if Yast::Mode.autoinst
-        Yast::AutoinstConfig.cio_ignore
-      else
-        @enabled = if kvm? || zvm?
-          # cio_ignore does not make sense for KVM or z/VM (fate#317861)
-          false
-        else
-          # default value requested in FATE#315586
-          true
-        end
-      end
+      @autoconf_enabled = autoconf_setting
+      @cio_enabled = cio_setting
     end
 
   private
@@ -37,6 +33,33 @@
       File.exist?("/proc/sysinfo") &&
         File.readlines("/proc/sysinfo").grep(/Control Program: z\/VM/).any?
     end
+
+    # Get current I/O device autoconf setting (rd.zdev kernel option)
+    #
+    # @return [Boolean]
+    def autoconf_setting
+      Yast.import "Bootloader"
+
+      rd_zdev = Yast::Bootloader.kernel_param(:common, "rd.zdev")
+      log.info "current rd.zdev setting: rd.zdev=#{rd_zdev.inspect}"
+
+      rd_zdev != "no-auto"
+    end
+
+    # Get current device blacklist setting (cio_ignore kernel option)
+    #
+    # @return [Boolean]
+    def cio_setting
+      if Yast::Mode.autoinst
+        Yast::AutoinstConfig.cio_ignore
+      elsif kvm? || zvm?
+        # cio_ignore does not make sense for KVM or z/VM (fate#317861)
+        false
+      else
+        # default value requested in FATE#315586
+        true
+      end
+    end
   end
 
   class CIOIgnoreProposal
@@ -45,7 +68,9 @@
 
     CIO_ENABLE_LINK = "cio_enable".freeze
     CIO_DISABLE_LINK = "cio_disable".freeze
-    CIO_ACTION_ID = "cio".freeze
+    AUTOCONF_ENABLE_LINK = "autoconf_enable".freeze
+    AUTOCONF_DISABLE_LINK = "autoconf_disable".freeze
+    ACTION_ID = "cio".freeze
 
     def initialize
       textdomain "installation"
@@ -63,44 +88,57 @@
       when "Description"
         {
           # this is a heading
-          "rich_text_title" => _("Blacklist Devices"),
+          "rich_text_title" => _("Device Settings"),
           # this is a menu entry
-          "menu_title"      => _("B&lacklist Devices"),
-          "id"              => CIO_ACTION_ID
+          "menu_title"      => _("Device Settings"),
+          "id"              => ACTION_ID
         }
       when "AskUser"
         edit param["chosen_id"]
       else
-        raise "Uknown action passed as first parameter"
+        raise "Unknown action passed as first parameter"
       end
     end
 
   private
 
+    # Build HTML text with clickable on/off-link.
+    #
+    # @param what [String] short text describing what to toggle
+    # @param state [Boolean] current state
+    # @param link_on [String] HTML ref for turning state to 'on'
+    # @param link_off [String] HTML ref for turning state to 'off'
+    #
+    # @return [String] HTML fragment
+    #
+    # @example
+    #   msg = toggle_text("Foobar state", true, "foobar_enable", 
"foobar_disable")
+    #
+    def toggle_text(what, state, link_on, link_off)
+      format "%s: %s (<a href=\"%s\">%s</a>).",
+        what,
+        (state ? _("enabled") : _("disabled")),
+        (state ? link_off : link_on),
+        (state ? _("disable") : _("enable"))
+    end
+
     def proposal_entry
       Yast.import "HTML"
-      enabled = CIOIgnore.instance.enabled
+      cio_enabled = CIOIgnore.instance.cio_enabled
+      autoconf_enabled = CIOIgnore.instance.autoconf_enabled
 
-      text = if enabled
-        # TRANSLATORS: Installation overview
-        # IMPORTANT: Please, do not change the HTML link <a 
href="...">...</a>, only visible text
-        (_(
-          "Blacklist devices enabled (<a href=\"%s\">disable</a>)."
-        ) % CIO_DISABLE_LINK)
-      else
-        # TRANSLATORS: Installation overview
-        # IMPORTANT: Please, do not change the HTML link <a 
href="...">...</a>, only visible text
-        (_(
-          "Blacklist devices disabled (<a href=\"%s\">enable</a>)."
-        ) % CIO_ENABLE_LINK)
-      end
+      cio_text = toggle_text(_("Blacklist devices"), cio_enabled, 
CIO_ENABLE_LINK, CIO_DISABLE_LINK)
+      autoconf_text = toggle_text(_("I/O device auto-configuration"), 
autoconf_enabled, AUTOCONF_ENABLE_LINK, AUTOCONF_DISABLE_LINK)
 
       {
-        "preformatted_proposal" => Yast::HTML.List([text]),
-        "links"                 => [CIO_ENABLE_LINK, CIO_DISABLE_LINK],
+        "preformatted_proposal" => Yast::HTML.List([cio_text, autoconf_text]),
+        "links"                 => [CIO_ENABLE_LINK, CIO_DISABLE_LINK, 
AUTOCONF_ENABLE_LINK, AUTOCONF_DISABLE_LINK],
         # TRANSLATORS: help text
         "help"                  => _(
-          "<p>Use <b>Blacklist devices</b> if you want to create blacklist 
channels to such devices which will reduce kernel memory footprint.</p>"
+          "<p>Use <b>Blacklist devices</b> " \
+          "if you want to create blacklist channels to such devices which will 
reduce kernel memory footprint.</p>" \
+          "<p>Disable <b>I/O device auto-configuration</b> " \
+          "if you don't want any existing I/O auto-configuration data to be 
applied.</p>"
         )
       }
     end
@@ -112,10 +150,17 @@
 
       cio_ignore = CIOIgnore.instance
 
-      cio_ignore.enabled = case edit_id
-      when CIO_DISABLE_LINK then false
-      when CIO_ENABLE_LINK  then true
-      when CIO_ACTION_ID    then !cio_ignore.enabled
+      case edit_id
+      when CIO_DISABLE_LINK
+        cio_ignore.cio_enabled = false
+      when CIO_ENABLE_LINK
+        cio_ignore.cio_enabled = true
+      when AUTOCONF_DISABLE_LINK
+        cio_ignore.autoconf_enabled = false
+      when AUTOCONF_ENABLE_LINK
+        cio_ignore.autoconf_enabled = true
+      when ACTION_ID
+        # do nothing - when there is a dialog for this, connect it here
       else
         raise "INTERNAL ERROR: Unexpected value #{edit_id}"
       end
@@ -161,32 +206,53 @@
         }
 
       when "Write"
-        return nil unless CIOIgnore.instance.enabled
+        write_cio_setting
+        write_autoconf_setting
 
-        res = Yast::SCR.Execute(YAST_BASH_PATH, "/sbin/cio_ignore --unused 
--purge")
+        nil
+      else
+        raise "Unknown action #{func} passed as first parameter"
+      end
+    end
 
-        log.info "result of cio_ignore call: #{res.inspect}"
+  private
 
-        if res["exit"] != 0
-          raise "cio_ignore command failed with stderr: #{res["stderr"]}"
-        end
+    # Update kernel options according to blacklist device setting
+    #
+    def write_cio_setting
+      return unless CIOIgnore.instance.cio_enabled
 
-        # add kernel parameters that ensure that ipl and console device is 
never
-        # blacklisted (fate#315318)
-        add_boot_kernel_parameters
+      res = Yast::SCR.Execute(YAST_BASH_PATH, "/sbin/cio_ignore --unused 
--purge")
 
-        # store activelly used devices to not be blocked
-        store_active_devices
+      log.info "result of cio_ignore call: #{res.inspect}"
 
-        nil
-      else
-        raise "Uknown action #{func} passed as first parameter"
+      if res["exit"] != 0
+        raise "cio_ignore command failed with stderr: #{res["stderr"]}"
       end
+
+      # add kernel parameters that ensure that ipl and console device is never
+      # blacklisted (fate#315318)
+      add_cio_boot_kernel_parameters
+
+      # store activelly used devices to not be blocked
+      store_active_devices
     end
 
-  private
+    # Update kernel options according to I/O device autoconf setting
+    #
+    def write_autoconf_setting
+      Yast.import "Bootloader"
+
+      if CIOIgnore.instance.autoconf_enabled
+        log.info "removing rd.zdev kernel parameter"
+        Yast::Bootloader.modify_kernel_params("rd.zdev" => :missing)
+      else
+        log.info "adding rd.zdev=no-auto kernel parameter"
+        Yast::Bootloader.modify_kernel_params("rd.zdev" => "no-auto")
+      end
+    end
 
-    def add_boot_kernel_parameters
+    def add_cio_boot_kernel_parameters
       Yast.import "Bootloader"
 
       # boot code is already proposed and will be written in next step, so 
just modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/src/lib/installation/clients/deploy_image_auto.rb 
new/yast2-installation-4.3.13/src/lib/installation/clients/deploy_image_auto.rb
--- 
old/yast2-installation-4.3.10/src/lib/installation/clients/deploy_image_auto.rb 
    2020-07-24 12:29:09.000000000 +0200
+++ 
new/yast2-installation-4.3.13/src/lib/installation/clients/deploy_image_auto.rb 
    2020-07-29 14:08:57.000000000 +0200
@@ -1,426 +1,191 @@
-# encoding: utf-8
-
-# 
------------------------------------------------------------------------------
-# Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
+# Copyright (c) [2020] SUSE LLC
 #
+# All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of version 2 of the GNU General Public License as published by the
-# Free Software Foundation.
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
 #
 # This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, contact Novell, Inc.
-#
-# To contact Novell about this file by physical or electronic mail, you may 
find
-# current contact information at www.novell.com.
-# 
------------------------------------------------------------------------------
-
-# File: deploy_image_auto.ycp
-# Module: Installation, FATE #301321: autoyast imaging
-# Summary: Image deployment for AutoYaST
-# Authors: Lukas Ocilka <loci...@suse.cz>
-#
-# $Id$
-#
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "installation/auto_client"
+
+Yast.import "UI"
+Yast.import "Label"
+Yast.import "Wizard"
+Yast.import "Progress"
+Yast.import "Installation"
+Yast.import "ImageInstallation"
+
 module Yast
-  class DeployImageAutoClient < Client
-    def main
-      Yast.import "UI"
+  class DeployImageAutoClient < ::Installation::AutoClient
+    include Yast::Logger
+
+    def initialize
       textdomain "installation"
+    end
 
-      Yast.import "Label"
-      Yast.import "Wizard"
-      Yast.import "Progress"
-      Yast.import "Installation"
-      Yast.import "ImageInstallation"
-      Yast.import "AutoinstSoftware"
-      Yast.import "Popup"
-
-      Builtins.y2milestone("----------------------------------------")
-      Builtins.y2milestone("Starting deploy_image_auto")
-
-      @progress_orig = Progress.set(false)
-
-      @ret = nil
-      @func = ""
-      @param = {}
-
-      # Check arguments
-      if Ops.greater_than(Builtins.size(WFM.Args), 0) &&
-          Ops.is_string?(WFM.Args(0))
-        @func = Convert.to_string(WFM.Args(0))
-        if Ops.greater_than(Builtins.size(WFM.Args), 1) &&
-            Ops.is_map?(WFM.Args(1))
-          @param = Convert.to_map(WFM.Args(1))
-        end
+    def run
+      progress_orig = Yast::Progress.set(false)
+      ret = super
+      Yast::Progress.set(progress_orig)
+
+      ret
+    end
+
+    def import(data)
+      ret = false
+      if data.key?("image_installation")
+        ImageInstallation.changed_by_user = true
+        Installation.image_installation = data["image_installation"]
+        log.info("Using image_installation: 
#{Installation.image_installation}")
+        ret = true
       end
-      Builtins.y2debug("func=%1", @func)
-      Builtins.y2debug("param=%1", @param)
+      ret
+    end
 
-      if @func == "Import"
-        if Builtins.haskey(@param, "image_installation")
-          ImageInstallation.changed_by_user = true
-          Installation.image_installation = Ops.get_boolean(
-            @param,
-            "image_installation",
-            false
-          )
-          Builtins.y2milestone(
-            "Using image_installation: %1",
-            Installation.image_installation
-          )
-          @ret = true
-        else
-          @ret = false
-        end
-      # Create a summary
-      # return string
-      elsif @func == "Summary"
-        @ret = "<ul><li>" +
-          (if Installation.image_installation
-             _("Installation from images is: <b>enabled</b>")
-           else
-             _("Installation from images is: <b>disabled</b>")
-           end) + "</li></ul>"
-      # did configuration changed
-      # return boolean
-      elsif @func == "GetModified"
-        !!self.class.modified
-      # set configuration as changed
-      # return boolean
-      elsif @func == "SetModified"
-        self.class.modified = true
-      # Reset configuration
-      # return map or list
-      elsif @func == "Reset"
-        ImageInstallation.FreeInternalVariables
-        Installation.image_installation = false
+    def summary
+      ret = "<ul><li>" +
+        (if Installation.image_installation
+           _("Installation from images is: <b>enabled</b>")
+         else
+           _("Installation from images is: <b>disabled</b>")
+         end) + "</li></ul>"
+      ret
+    end
+
+    def modified?
+      self.class.modified
+    end
+
+    def modified
+      self.class.modified = true
+      true
+    end
+
+    def reset
+      ImageInstallation.FreeInternalVariables
+      Installation.image_installation = false
+      true
+    end
+
+    def change
       # Change configuration
       # return symbol (i.e. `finish || `accept || `next || `cancel || `abort)
-      elsif @func == "Change"
-        Wizard.CreateDialog
-        Wizard.SetContentsButtons(
-          # TRANSLATORS: dialog caption
-          _("Installation from Images"),
-          HBox(
-            HStretch(),
-            VBox(
-              Frame(
-                _("Installation from Images"),
-                VBox(
-                  Label(
-                    _(
-                      "Here you can choose to use Novell pre-defined images to 
speed up RPM installation."
-                    )
-                  ),
-                  RadioButtonGroup(
-                    Id(:images_rbg),
-                    MarginBox(
-                      2,
-                      1,
-                      VBox(
-                        Left(
-                          RadioButton(
-                            Id(:inst_from_images),
-                            Opt(:notify),
-                            _("&Install from Images"),
-                            Installation.image_installation == true
-                          )
-                        ),
-                        VSpacing(0.5),
-                        Left(
-                          RadioButton(
-                            Id(:dont_inst_from_images),
-                            Opt(:notify),
-                            _("&Do not Install from Images"),
-                            Installation.image_installation != true
-                          )
-                        )
-                      )
-                    )
+      Wizard.CreateDialog
+      Wizard.SetContentsButtons(
+        # TRANSLATORS: dialog caption
+        _("Installation from Images"),
+        HBox(
+          HStretch(),
+          VBox(
+            Frame(
+              _("Installation from Images"),
+              VBox(
+                Label(
+                  _(
+                    "Here you can choose to use pre-defined images to speed up 
RPM installation."
                   )
-                )
-              ),
-              VSpacing(0.5),
-              Frame(
-                _(
-                  "Custom images deployment - this needs a URL to be 
configured as installation source"
                 ),
-                # Image name, Image location
-                MarginBox(
-                  2,
-                  1,
-                  VBox(
-                    Label(
-                      _("Here you can create custom images.\n") +
-                        _(
-                          "You have to configure the software selection first 
before you can create an image here"
+                RadioButtonGroup(
+                  Id(:images_rbg),
+                  MarginBox(
+                    2,
+                    1,
+                    VBox(
+                      Left(
+                        RadioButton(
+                          Id(:inst_from_images),
+                          Opt(:notify),
+                          _("&Install from Images"),
+                          Installation.image_installation == true
                         )
-                    ),
-                    RadioButtonGroup(
-                      Id(:own_images_rbg),
-                      MarginBox(
-                        2,
-                        1,
-                        VBox(
-                          Frame(
-                            _(
-                              "Create an image file (AutoYaST will fetch it 
from the given location during installation)"
-                            ),
-                            VBox(
-                              RadioButton(
-                                Id(:create_image),
-                                Opt(:notify, :default, :hstretch),
-                                _("Create Image")
-                              ),
-                              TextEntry(
-                                Id(:image_location),
-                                Opt(:notify),
-                                _(
-                                  "Where will AutoYaST find the image? (e.g. 
http://host/)"
-                                ),
-                                Ops.get_string(
-                                  AutoinstSoftware.image,
-                                  "image_location",
-                                  ""
-                                )
-                              ),
-                              TextEntry(
-                                Id(:image_name),
-                                Opt(:notify),
-                                _(
-                                  "What is the name of the image? (e.g. 
my_image)"
-                                ),
-                                Ops.get_string(
-                                  AutoinstSoftware.image,
-                                  "image_name",
-                                  ""
-                                )
-                              ),
-                              VSpacing(0.5),
-                              RadioButton(
-                                Id(:create_iso),
-                                Opt(:notify, :default, :hstretch),
-                                _(
-                                  "Create ISO (image and autoinst.xml will be 
on the media)"
-                                )
-                              )
-                            )
-                          )
+                      ),
+                      VSpacing(0.5),
+                      Left(
+                        RadioButton(
+                          Id(:dont_inst_from_images),
+                          Opt(:notify),
+                          _("&Do not Install from Images"),
+                          Installation.image_installation != true
                         )
                       )
                     )
                   )
                 )
               )
-            ),
-            HStretch()
-          ),
-          # TRANSLATORS: help text
-          _(
-            "<p><b>Installation from Images</b> is used to speed the 
installation up.\n" \
-              "Images contain compressed snapshots of an installed system 
matching your\n" \
-              "selection of patterns. The rest of the packages which are not 
contained in the\n" \
-              "images will be installed from packages the standard way.</p>\n"
-          ) +
-            _(
-              "<p><b>Creating own Images</b> is used if you\n" \
-                "want to skip the complete step of RPM installation. Instead 
AutoYaST will dump an\n" \
-                "image on the harddisk which is a lot faster and can be 
pre-configured already.\n" \
-                "Everything else than RPM installation is done like during a 
normal auto-installation.</p>"
-            ),
-          Label.BackButton,
-          Label.OKButton
-        )
-        Wizard.SetAbortButton(:abort, Label.CancelButton)
-        Wizard.DisableBackButton
-        @selected = UI.QueryWidget(:images_rbg, :CurrentButton)
-        UI.ChangeWidget(
-          Id(:create_image),
-          :Enabled,
-          @selected == :dont_inst_from_images
-        )
-        UI.ChangeWidget(
-          Id(:create_iso),
-          :Enabled,
-          @selected == :dont_inst_from_images
-        )
-        UI.ChangeWidget(
-          Id(:image_location),
-          :Enabled,
-          @selected == :dont_inst_from_images
-        )
-        UI.ChangeWidget(
-          Id(:image_name),
-          :Enabled,
-          @selected == :dont_inst_from_images
-        )
-        loop do
-          if Ops.greater_than(
-            Builtins.size(
-              Convert.to_string(UI.QueryWidget(:image_location, :Value))
-            ),
-            0
-          ) ||
-              Ops.greater_than(
-                Builtins.size(
-                  Convert.to_string(UI.QueryWidget(:image_name, :Value))
-                ),
-                0
-              )
-            UI.ChangeWidget(Id(:inst_from_images), :Enabled, false)
-          else
-            UI.ChangeWidget(Id(:inst_from_images), :Enabled, true)
-          end
-
-          if AutoinstSoftware.instsource == ""
-            UI.ChangeWidget(Id(:create_image), :Enabled, false)
-            UI.ChangeWidget(Id(:create_iso), :Enabled, false)
-          end
-
-          @ret = UI.UserInput
-          Builtins.y2milestone("ret=%1", @ret)
-
-          if @ret == :ok || @ret == :next
-            @selected2 = UI.QueryWidget(:images_rbg, :CurrentButton)
-            @image_type = UI.QueryWidget(:own_images_rbg, :CurrentButton)
-            Ops.set(AutoinstSoftware.image, "run_kickoff", true)
-            if @selected2 == :inst_from_images
-              Installation.image_installation = true
-              AutoinstSoftware.image = {}
-            elsif @selected2 == :dont_inst_from_images
-              Installation.image_installation = false
-              if @image_type == :create_image
-                Ops.set(
-                  AutoinstSoftware.image,
-                  "image_location",
-                  Convert.to_string(UI.QueryWidget(:image_location, :Value))
-                )
-                Ops.set(
-                  AutoinstSoftware.image,
-                  "image_name",
-                  Convert.to_string(UI.QueryWidget(:image_name, :Value))
-                )
-                AutoinstSoftware.createImage("")
-              elsif @image_type == :create_iso
-                AutoinstSoftware.createISO
-              end
-            end
-            Builtins.y2milestone(
-              "Changed by user, Installation from images will be used: %1",
-              Installation.image_installation
             )
-          elsif @ret == :create_image
-            UI.ChangeWidget(Id(:image_location), :Enabled, true)
-            UI.ChangeWidget(Id(:image_name), :Enabled, true)
-            if Ops.greater_than(Builtins.size(AutoinstSoftware.patterns), 0)
-              Ops.set(
-                AutoinstSoftware.image,
-                "image_location",
-                Convert.to_string(UI.QueryWidget(:image_location, :Value))
-              )
-              Ops.set(
-                AutoinstSoftware.image,
-                "image_name",
-                Convert.to_string(UI.QueryWidget(:image_name, :Value))
-              )
-            else
-              Popup.Warning(
-                _(
-                  "you need to do the software selection before creating an 
image"
-                )
-              )
-            end
-          elsif @ret == :create_iso
-            UI.ChangeWidget(Id(:image_location), :Enabled, false)
-            UI.ChangeWidget(Id(:image_name), :Enabled, false)
-            Ops.set(AutoinstSoftware.image, "image_name", "image")
-            if Ops.less_or_equal(Builtins.size(AutoinstSoftware.patterns), 0)
-              Popup.Warning(
-                _(
-                  "you need to do the software selection before creating an 
image"
-                )
-              )
-            end
-          elsif @ret == :inst_from_images || @ret == :dont_inst_from_images
-            @selected2 = UI.QueryWidget(:images_rbg, :CurrentButton)
-            UI.ChangeWidget(
-              Id(:create_image),
-              :Enabled,
-              @selected2 == :dont_inst_from_images
-            )
-            UI.ChangeWidget(
-              Id(:create_iso),
-              :Enabled,
-              @selected2 == :dont_inst_from_images
-            )
-            UI.ChangeWidget(
-              Id(:image_location),
-              :Enabled,
-              @selected2 == :dont_inst_from_images
-            )
-            UI.ChangeWidget(
-              Id(:image_name),
-              :Enabled,
-              @selected2 == :dont_inst_from_images
-            )
-            if @ret == :inst_from_images
-              UI.ChangeWidget(Id(:create_image), :Value, false)
-              UI.ChangeWidget(Id(:create_iso), :Value, false)
-            end
+          ),
+          HStretch()
+        ),
+        # TRANSLATORS: help text
+        _(
+          "<p><b>Installation from Images</b> is used to speed the 
installation up.\n" \
+            "Images contain compressed snapshots of an installed system 
matching your\n" \
+            "selection of patterns. The rest of the packages which are not 
contained in the\n" \
+            "images will be installed from packages the standard way.</p>\n"
+        ),
+        Label.BackButton,
+        Label.OKButton
+      )
+      Wizard.SetAbortButton(:abort, Label.CancelButton)
+      Wizard.DisableBackButton
+      ret = :ok
+      loop do
+        ret = UI.UserInput
+        log.info("ret={ret}")
+
+        if ret == :ok || ret == :next
+          selected = UI.QueryWidget(:images_rbg, :CurrentButton)
+          if selected == :inst_from_images
+            Installation.image_installation = true
+          elsif selected == :dont_inst_from_images
+            Installation.image_installation = false
           end
-          break if [:ok, :next, :abort].include?(@ret)
+          log.info("Changed by user, Installation from images will be used: " \
+            "#{Installation.image_installation}")
         end
+        break if [:ok, :next, :abort].include?(ret)
+      end
 
-        Wizard.CloseDialog
-        return deep_copy(@ret)
-      # Return configuration data
-      # return map or list
-      elsif @func == "Export"
-        @ret = if Installation.image_installation
-          { "image_installation" => true }
-        else
-          {}
-        end
-      # Write the configuration (prepare images, deploy images)
-      elsif @func == "Write"
-        Builtins.y2milestone(
-          "Using images: %1",
-          Installation.image_installation
-        )
-
-        # BNC #442691
-        # Calling image_installation only if set to do so...
-        if Installation.image_installation == true
-          WFM.call("inst_prepare_image")
+      Wizard.CloseDialog
+      ret
+    end
 
-          # moved to control.xml
-          #    WFM::call ("inst_deploy_image");
-        end
+    def packages
+      {}
+    end
 
-        @ret = true
-      # Read configuration data
-      # return boolean
-      elsif @func == "Read"
-        Builtins.y2milestone("Read not supported")
-        @ret = true
+    def export
+      if Installation.image_installation
+        { "image_installation" => true }
       else
-        Builtins.y2error("unknown function: %1", @func)
-        @ret = false
+        {}
       end
-      Progress.set(@progress_orig)
+    end
 
-      Builtins.y2debug("ret=%1", @ret)
-      Builtins.y2milestone("deploy_image_auto finished")
-      Builtins.y2milestone("----------------------------------------")
+    def write
+      log.info("Using images: #{Installation.image_installation}")
+      # BNC #442691
+      # Calling image_installation only if set to do so...
+      WFM.call("inst_prepare_image") if Installation.image_installation
 
-      deep_copy(@ret)
+      true
+    end
 
-      # EOF
+    def read
+      log.info("Read not supported")
+      true
     end
 
     class << self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/src/modules/ImageInstallation.rb 
new/yast2-installation-4.3.13/src/modules/ImageInstallation.rb
--- old/yast2-installation-4.3.10/src/modules/ImageInstallation.rb      
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/src/modules/ImageInstallation.rb      
2020-07-29 14:08:57.000000000 +0200
@@ -678,9 +678,10 @@
         return false
       end
 
-      read_details = XML.XMLToYCPFile(filename)
-      if read_details.nil?
-        Builtins.y2error("Cannot parse imagesets details")
+      begin
+        read_details = XML.XMLToYCPFile(filename)
+      rescue XMLDeserializationError => e
+        Builtins.y2error("Cannot parse imagesets details. #{e.inspect}")
         return false
       end
 
@@ -820,12 +821,14 @@
         return true
       end
 
-      image_descr = XML.XMLToYCPFile(filename)
-      if image_descr.nil?
+      begin
+        image_descr = XML.XMLToYCPFile(filename)
+      rescue RuntimeError => e
         @image_installation_available = false
         Installation.image_installation = false
         Installation.image_only = false
         Report.Error(_("Failed to read information about installation images"))
+        log.error "xml failed to read #{e.inspect}"
         return false
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.3.10/test/cio_ignore_test.rb 
new/yast2-installation-4.3.13/test/cio_ignore_test.rb
--- old/yast2-installation-4.3.10/test/cio_ignore_test.rb       2020-07-24 
12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/test/cio_ignore_test.rb       2020-07-29 
14:08:57.000000000 +0200
@@ -5,12 +5,12 @@
 require "installation/cio_ignore"
 
 describe ::Installation::CIOIgnore do
-  describe "enable/disable" do
+  describe "cio_ignore enable/disable" do
     it "take AutoYaST cio_ignore setting" do
       allow(Yast::Mode).to receive(:autoinst).and_return(true)
       allow(Yast::AutoinstConfig).to receive(:cio_ignore).and_return(false)
       ::Installation::CIOIgnore.instance.reset
-      expect(::Installation::CIOIgnore.instance.enabled).to eq(false)
+      expect(::Installation::CIOIgnore.instance.cio_enabled).to eq(false)
     end
 
     it "take default cio_ignore entry if it is in the normal workflow" do
@@ -18,7 +18,7 @@
       expect(Yast::AutoinstConfig).not_to receive(:cio_ignore)
       expect(File).to 
receive(:exist?).with("/proc/sysinfo").exactly(2).times.and_return(false)
       ::Installation::CIOIgnore.instance.reset
-      expect(::Installation::CIOIgnore.instance.enabled).to eq(true)
+      expect(::Installation::CIOIgnore.instance.cio_enabled).to eq(true)
     end
   end
 end
@@ -40,14 +40,44 @@
         expect(result).to have_key("preformatted_proposal")
       end
 
-      it "change its content based on cio ignore proposal value" do
-        ::Installation::CIOIgnore.instance.enabled = false
+      it "the proposal text is correct if cio_ignore is disabled" do
+        ::Installation::CIOIgnore.instance.cio_enabled = false
 
         result = subject.run("MakeProposal")
 
         expect(result).to have_key("links")
         expect(result).to have_key("help")
-        expect(result["preformatted_proposal"]).to include("disabled")
+        expect(result["preformatted_proposal"]).to match(/Blacklist devices: 
disabled/)
+      end
+
+      it "the proposal text is correct if cio_ignore is enabled" do
+        ::Installation::CIOIgnore.instance.cio_enabled = true
+
+        result = subject.run("MakeProposal")
+
+        expect(result).to have_key("links")
+        expect(result).to have_key("help")
+        expect(result["preformatted_proposal"]).to match(/Blacklist devices: 
enabled/)
+      end
+
+      it "the proposal text is correct if device autoconf is disabled" do
+        ::Installation::CIOIgnore.instance.autoconf_enabled = false
+
+        result = subject.run("MakeProposal")
+
+        expect(result).to have_key("links")
+        expect(result).to have_key("help")
+        expect(result["preformatted_proposal"]).to match(/auto-configuration: 
disabled/)
+      end
+
+      it "the proposal text is correct if device autoconf is enabled" do
+        ::Installation::CIOIgnore.instance.autoconf_enabled = true
+
+        result = subject.run("MakeProposal")
+
+        expect(result).to have_key("links")
+        expect(result).to have_key("help")
+        expect(result["preformatted_proposal"]).to match(/auto-configuration: 
enabled/)
       end
     end
 
@@ -70,7 +100,7 @@
         result = subject.run(*params)
 
         expect(result["workflow_sequence"]).to eq :next
-        expect(::Installation::CIOIgnore.instance.enabled).to be false
+        expect(::Installation::CIOIgnore.instance.cio_enabled).to be false
       end
 
       it "raises RuntimeError if passed without chosen_id in second param 
hash" do
@@ -138,7 +168,7 @@
 
       describe "Device blacklisting is disabled" do
         it "does nothing" do
-          ::Installation::CIOIgnore.instance.enabled = false
+          ::Installation::CIOIgnore.instance.cio_enabled = false
 
           expect(Yast::SCR).to_not receive(:Execute)
           expect(Yast::Bootloader).to_not receive(:Read)
@@ -149,7 +179,7 @@
 
       describe "Device blacklisting is enabled" do
         it "calls `cio_ignore --unused --purge`" do
-          ::Installation::CIOIgnore.instance.enabled = true
+          ::Installation::CIOIgnore.instance.cio_enabled = true
 
           expect(Yast::SCR).to receive(:Execute)
             .with(
@@ -163,7 +193,7 @@
         end
 
         it "raises RuntimeError if cio_ignore call failed" do
-          ::Installation::CIOIgnore.instance.enabled = true
+          ::Installation::CIOIgnore.instance.cio_enabled = true
           stderr = "HORRIBLE ERROR!!!"
 
           expect(Yast::SCR).to receive(:Execute)
@@ -178,7 +208,8 @@
         end
 
         it "adds kernel parameters IPLDEV and CONDEV to the bootloader" do
-          expect(Yast::Bootloader).to receive(:modify_kernel_params).once
+          expect(Yast::Bootloader).to receive(:modify_kernel_params)
+            .with("cio_ignore" => "all,!ipldev,!condev").once
             .and_return(true)
 
           subject.run("Write")
@@ -222,6 +253,30 @@
           expect { subject.run("Write") }.to raise_error(RuntimeError, 
/cio_ignore -L failed/)
         end
       end
+
+      describe "I/O device autoconf is disabled" do
+        it "adds kernel parameter rd.zdev=no-auto" do
+          ::Installation::CIOIgnore.instance.autoconf_enabled = false
+
+          expect(Yast::Bootloader).to receive(:modify_kernel_params)
+            .with("rd.zdev" => "no-auto").once
+            .and_return(true)
+
+          subject.run("Write")
+        end
+      end
+
+      describe "I/O device autoconf is enabled" do
+        it "removes kernel parameter rd.zdev" do
+          ::Installation::CIOIgnore.instance.autoconf_enabled = true
+
+          expect(Yast::Bootloader).to receive(:modify_kernel_params)
+            .with("rd.zdev" => :missing).once
+            .and_return(true)
+
+          subject.run("Write")
+        end
+      end
     end
 
     it "raises RuntimeError if unknown action passed as first parameter" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/test/image_installation_test.rb 
new/yast2-installation-4.3.13/test/image_installation_test.rb
--- old/yast2-installation-4.3.10/test/image_installation_test.rb       
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/test/image_installation_test.rb       
2020-07-29 14:08:57.000000000 +0200
@@ -24,6 +24,8 @@
 ARCHS = ["i386", "x86_64", "ppc"].freeze
 
 describe Yast::ImageInstallation do
+  subject { described_class }
+
   before do
     stub_const("Yast::Packages", double(theSources: [0]))
   end
@@ -70,5 +72,17 @@
         end
       end
     end
+
+    it "returns true if no xml is provided" do
+      allow(Yast::Pkg).to receive(:SourceProvideDigestedFile).and_return(nil)
+
+      expect(subject.FindImageSet([])).to eq true
+    end
+
+    it "returns false if xml is not valid" do
+      allow(Yast::XML).to 
receive(:XMLToYCPFile).and_raise(Yast::XMLDeserializationError)
+
+      expect(subject.FindImageSet([])).to eq false
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.3.10/test/lib/clients/deploy_image_auto_test.rb 
new/yast2-installation-4.3.13/test/lib/clients/deploy_image_auto_test.rb
--- old/yast2-installation-4.3.10/test/lib/clients/deploy_image_auto_test.rb    
2020-07-24 12:29:09.000000000 +0200
+++ new/yast2-installation-4.3.13/test/lib/clients/deploy_image_auto_test.rb    
2020-07-29 14:08:57.000000000 +0200
@@ -6,31 +6,70 @@
 Yast.import "Installation"
 
 describe Yast::DeployImageAutoClient do
-  describe "#main" do
-    before do
-      allow(Yast::WFM).to receive(:Args) do |*params|
-        if params.empty?
-          args
-        else
-          args[params.first]
-        end
-      end
-    end
-
-    context "Export argument passed" do
-      let(:args) { ["Export"] }
+  subject(:client) { Yast::DeployImageAutoClient.new }
 
-      it "return empty hash if image deployment is disabled" do
+  describe "#export" do
+    context "image deployment is disabled" do
+      it "return empty hash" do
         allow(Yast::Installation).to 
receive(:image_installation).and_return(false)
 
-        expect(subject.main).to eq({})
+        expect(subject.export).to eq({})
       end
+    end
 
-      it "return hash with image_installation if image deployment is enabled" 
do
+    context "image deployment is enabled" do
+      it "return hash with image_installation" do
         allow(Yast::Installation).to 
receive(:image_installation).and_return(true)
 
-        expect(subject.main).to eq("image_installation" => true)
+        expect(subject.export).to eq("image_installation" => true)
       end
     end
   end
+
+  describe "#import" do
+    let(:profile) { { "image_installation" => true } }
+
+    it "imports the profile" do
+      client.import(profile)
+      expect(Yast::Installation.image_installation).to eq(true)
+      expect(Yast::ImageInstallation.changed_by_user).to eq(true)
+    end
+  end
+
+  describe "#summary" do
+    before do
+      Yast::Installation.image_installation = true
+    end
+
+    it "returns the AutoYaST summary" do
+      expect(client.summary).to match(/enabled/)
+    end
+  end
+
+  describe "#modified?" do
+    it "settings are modified ?" do
+      client.modified
+      expect(client.modified?).to eq(true)
+    end
+  end
+
+  describe "#reset" do
+    it "resets settings" do
+      expect(Yast::ImageInstallation).to receive(:FreeInternalVariables)
+      client.reset
+      expect(Yast::Installation.image_installation).to eq(false)
+    end
+  end
+
+  describe "#write" do
+    context "image installation enabled" do
+      it "writes keyboard information" do
+        expect(Yast::WFM).to receive(:call).with("inst_prepare_image")
+        Yast::Installation.image_installation = true
+
+        client.write
+      end
+    end
+  end
+
 end


Reply via email to