Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2017-06-07 13:08:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Wed Jun  7 13:08:45 2017 rev:386 rq:500424 version:3.2.44

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2017-05-06 20:45:53.994448614 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes   
    2017-06-07 13:08:47.148471844 +0200
@@ -1,0 +2,43 @@
+Thu Jun  1 12:58:03 CEST 2017 - [email protected]
+
+- "custom" roles: Initialize pattern selection screen with settings
+  defined in the control files. (bnc#1031295)
+- 3.2.44
+
+-------------------------------------------------------------------
+Tue May 31 21:47:24 UTC 2017 - [email protected]
+
+- Do not lose the desktop selection when the online repositories is
+  pressed. (bsc#1033594)
+- Do not allow to continue without desktop selection. (bsc#1040884)
+- 3.2.43
+
+-------------------------------------------------------------------
+Wed May 31 10:52:59 UTC 2017 - [email protected]
+
+- Fixed path to the "adddir" command (it is /sbin instead of /etc)
+  (bsc#1041882)
+- 3.2.42
+
+-------------------------------------------------------------------
+Mon May 29 08:37:19 UTC 2017 - [email protected]
+
+- Added requirement of 'cwm/widget' in hiding_place as consequence
+  of changes made in CWM. (boo#1039901).
+- 3.2.41
+
+-------------------------------------------------------------------
+Mon May 22 10:50:32 UTC 2017 - [email protected]
+
+- Fixed push button label ("Configure Online Repositories")
+  (bsc#1039988)
+- 3.2.40
+
+-------------------------------------------------------------------
+Mon May  8 13:17:17 UTC 2017 - [email protected]
+
+- Don't crash if the regurl provided by linuxrc is invalid using
+  the one provided by the control file as fallback (bsc#1035908).
+- 3.2.39
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.3CnlSN/_old  2017-06-07 13:08:47.708392833 +0200
+++ /var/tmp/diff_new_pack.3CnlSN/_new  2017-06-07 13:08:47.712392268 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.2.38
+Version:        3.2.44
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -76,8 +76,8 @@
 # writing settings in the first installation stage.
 Requires:       yast2-services-manager >= 3.2.1
 
-# Network service setup moved into yast2-network
-Requires:       yast2-network >= 3.1.143
+## Moved inst_install_inf from yast2-network to this package
+Requires:       yast2-network >= 3.2.25
 
 # Augeas lenses
 Requires:       augeas-lenses

++++++ yast2-installation-3.2.38.tar.bz2 -> yast2-installation-3.2.44.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/package/yast2-installation.changes 
new/yast2-installation-3.2.44/package/yast2-installation.changes
--- old/yast2-installation-3.2.38/package/yast2-installation.changes    
2017-05-04 15:58:44.317375667 +0200
+++ new/yast2-installation-3.2.44/package/yast2-installation.changes    
2017-06-01 16:47:44.346101535 +0200
@@ -1,4 +1,47 @@
 -------------------------------------------------------------------
+Thu Jun  1 12:58:03 CEST 2017 - [email protected]
+
+- "custom" roles: Initialize pattern selection screen with settings
+  defined in the control files. (bnc#1031295)
+- 3.2.44
+
+-------------------------------------------------------------------
+Tue May 31 21:47:24 UTC 2017 - [email protected]
+
+- Do not lose the desktop selection when the online repositories is
+  pressed. (bsc#1033594)
+- Do not allow to continue without desktop selection. (bsc#1040884)
+- 3.2.43
+
+-------------------------------------------------------------------
+Wed May 31 10:52:59 UTC 2017 - [email protected]
+
+- Fixed path to the "adddir" command (it is /sbin instead of /etc)
+  (bsc#1041882)
+- 3.2.42
+
+-------------------------------------------------------------------
+Mon May 29 08:37:19 UTC 2017 - [email protected]
+
+- Added requirement of 'cwm/widget' in hiding_place as consequence
+  of changes made in CWM. (boo#1039901).
+- 3.2.41
+
+-------------------------------------------------------------------
+Mon May 22 10:50:32 UTC 2017 - [email protected]
+
+- Fixed push button label ("Configure Online Repositories")
+  (bsc#1039988)
+- 3.2.40
+
+-------------------------------------------------------------------
+Mon May  8 13:17:17 UTC 2017 - [email protected]
+
+- Don't crash if the regurl provided by linuxrc is invalid using
+  the one provided by the control file as fallback (bsc#1035908).
+- 3.2.39
+
+-------------------------------------------------------------------
 Wed Apr 26 15:03:33 UTC 2017 - [email protected]
 
 - Move CaaSP specific code to yast2-caasp package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/package/yast2-installation.spec 
new/yast2-installation-3.2.44/package/yast2-installation.spec
--- old/yast2-installation-3.2.38/package/yast2-installation.spec       
2017-05-04 15:58:44.317375667 +0200
+++ new/yast2-installation-3.2.44/package/yast2-installation.spec       
2017-06-01 16:47:44.346101535 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.2.38
+Version:        3.2.44
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -76,8 +76,8 @@
 # writing settings in the first installation stage.
 Requires: yast2-services-manager >= 3.2.1
 
-# Network service setup moved into yast2-network
-Requires: yast2-network >= 3.1.143
+## Moved inst_install_inf from yast2-network to this package
+Requires: yast2-network >= 3.2.25
 
 # Augeas lenses
 Requires:       augeas-lenses
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/clients/inst_install_inf.rb 
new/yast2-installation-3.2.44/src/clients/inst_install_inf.rb
--- old/yast2-installation-3.2.38/src/clients/inst_install_inf.rb       
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.2.44/src/clients/inst_install_inf.rb       
2017-06-01 16:47:44.346101535 +0200
@@ -0,0 +1,3 @@
+require "installation/clients/inst_install_inf"
+
+Yast::InstInstallInfClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/clients/inst_install_inf.rb 
new/yast2-installation-3.2.44/src/lib/installation/clients/inst_install_inf.rb
--- 
old/yast2-installation-3.2.38/src/lib/installation/clients/inst_install_inf.rb  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-installation-3.2.44/src/lib/installation/clients/inst_install_inf.rb  
    2017-06-01 16:47:44.354101535 +0200
@@ -0,0 +1,84 @@
+require "yast"
+require "network/install_inf_convertor"
+require "installation/dialogs/registration_url_dialog"
+
+module Yast
+  class InstInstallInfClient < Client
+    VALID_URL_SCHEMES = ["http", "https"].freeze
+
+    include Yast::Logger
+    include Yast::I18n
+
+    Yast.import "Linuxrc"
+    Yast.import "Wizard"
+    Yast.import "WFM"
+
+    def main
+      textdomain "installation"
+
+      InstallInfConvertor.instance.write_netconfig unless Mode.auto
+
+      Yast::Wizard.CreateDialog if separate_wizard_needed?
+
+      regurl = Linuxrc.InstallInf("regurl")
+
+      fix_regurl!(regurl) if need_fix?(regurl)
+
+      Yast::Wizard.CloseDialog if separate_wizard_needed?
+
+      :next
+    end
+
+  private
+
+    # Checks if the given url is invalid and needs to be fixed.
+    #
+    # @params url [String]
+    # @return [Boolean] return true if not nil and invalid.
+    def need_fix?(url)
+      url && !valid_url?(url)
+    end
+
+    # Shows a dialog allowing the user to modify the invalid URL, modifying the
+    # /etc/install.inf file with the new value. In case of cancelled or empty,
+    # the URL will be completely removed.
+    #
+    # @param regurl [String]
+    def fix_regurl!(regurl)
+      while need_fix?(regurl)
+        new_url = ::Installation::RegistrationURLDialog.new(regurl).run
+        case new_url
+        when :cancel
+          if Popup.YesNo(_("If you decide to cancel, the custom URL\n" \
+                         "will be completelly ignored.\n\n" \
+                         "Really cancel URL modification?"))
+            regurl = nil
+          end
+        when "",
+          regurl = nil
+        else
+          regurl = new_url
+        end
+      end
+
+      SCR.Write(path(".etc.install_inf.regurl"), regurl)
+      SCR.Write(path(".etc.install_inf"), nil) # Flush the cache
+      Linuxrc.ResetInstallInf
+    end
+
+    # Check if the given URI is valid or not
+    #
+    # @params url [String]
+    # @return [Boolean]
+    def valid_url?(url)
+      VALID_URL_SCHEMES.include?(URI(url).scheme)
+    rescue URI::InvalidURIError
+      false
+    end
+
+    # Returns whether we need/ed to create new UI Wizard
+    def separate_wizard_needed?
+      Yast::Mode.normal
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/clients/inst_update_installer.rb
 
new/yast2-installation-3.2.44/src/lib/installation/clients/inst_update_installer.rb
--- 
old/yast2-installation-3.2.38/src/lib/installation/clients/inst_update_installer.rb
 2017-05-04 15:58:44.489375667 +0200
+++ 
new/yast2-installation-3.2.44/src/lib/installation/clients/inst_update_installer.rb
 2017-06-01 16:47:44.358101535 +0200
@@ -176,6 +176,11 @@
       @update_repositories = update_repositories_finder.updates
       log.info("self-update repositories are #{@update_repositories.inspect}")
       @update_repositories
+
+    rescue ::Installation::RegistrationURLError
+      Report.Error(_("The registration URL provided is not valid.\n" \
+                  "Skipping installer update.\n"))
+      @update_repositories = []
     end
 
     # Return the custom self-update URL
@@ -311,6 +316,7 @@
       require "registration/url_helpers"
       require "registration/registration"
       require "registration/ui/regservice_selection_dialog"
+      require "registration/exceptions"
       @require_registration_libraries = true
     rescue LoadError
       log.info "yast2-registration is not available"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/dialogs/registration_url_dialog.rb
 
new/yast2-installation-3.2.44/src/lib/installation/dialogs/registration_url_dialog.rb
--- 
old/yast2-installation-3.2.38/src/lib/installation/dialogs/registration_url_dialog.rb
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-installation-3.2.44/src/lib/installation/dialogs/registration_url_dialog.rb
       2017-06-01 16:47:44.362101535 +0200
@@ -0,0 +1,43 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 SUSE LLC
+#
+#
+# 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 SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "installation/dialogs/url_dialog"
+
+module Installation
+  class RegistrationURLDialog < ::Installation::URLDialog
+    def help_text
+      # TRANSLATORS: Help text alerting the user about a invalid url
+      _("<p>\n" \
+        "The registration URL provided in the command line is not valid.\n" \
+        "Check that you entered it correctly and try again.\n" \
+        "</p>")
+    end
+
+    def entry_label
+      _("Registration URL")
+    end
+
+    def dialog_title
+      _("Registration URL")
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/dialogs/url_dialog.rb 
new/yast2-installation-3.2.44/src/lib/installation/dialogs/url_dialog.rb
--- old/yast2-installation-3.2.38/src/lib/installation/dialogs/url_dialog.rb    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.2.44/src/lib/installation/dialogs/url_dialog.rb    
2017-06-01 16:47:44.362101535 +0200
@@ -0,0 +1,138 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 SUSE LLC
+#
+#
+# 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 SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "ui/dialog"
+
+module Installation
+  # A subclass of UI::Dialog which provides a common dialog to edit an url. It
+  # is composed by two buttons to confirm and cancel the edition, a dialog
+  # heading and a help text.
+  #
+  # @example simple url location dialog
+  #
+  #   class ExampleURLDialog < UI::URLDialog
+  #     def entry_label
+  #       "Example URL"
+  #     end
+  #   end
+  class URLDialog < UI::Dialog
+    include Yast::I18n
+    include Yast::UIShortcuts
+
+    attr_accessor :url
+
+    # Constructor
+    #
+    # The dialog text entry will be filled with the url given
+    #
+    # @param url [String]
+    def initialize(url)
+      @url = url
+    end
+
+    # Shows a dialog when the given url is wrong
+    #
+    # @param [String] original Original value
+    # @return [String] new value
+    def dialog_content
+      VBox(
+        show_heading? ? Heading(dialog_title) : Empty(),
+        show_help? ? RichText(help_text) : Empty(),
+        VSpacing(1),
+        VStretch(),
+        MinWidth(60,
+          Left(TextEntry(Id(:uri), entry_label, @url))),
+        VSpacing(1),
+        VStretch(),
+        HBox(
+          PushButton(Id(:ok), Opt(:default), ok_label),
+          PushButton(Id(:cancel), cancel_label)
+        )
+      )
+    end
+
+    # Handler for the :ok button which queries the value of the URL entry and
+    # finish the dialog returning the value of it
+    #
+    # @return  [String] the value of the url text entry
+    def ok_handler
+      @url = Yast::UI.QueryWidget(Id(:uri), :Value)
+      finish_dialog(@url)
+    end
+
+    # Handler for the :cancel button wich finishes the dialog and returns 
:cancel
+    #
+    # @return [Symbol] :cancel
+    def cancel_handler
+      finish_dialog(:cancel)
+    end
+
+    def ok_label
+      Yast::Label.OKButton
+    end
+
+    def cancel_label
+      Yast::Label.CancelButton
+    end
+
+    # Help text that will be displayed above the url entry
+    #
+    # @return [String]
+    def help_text
+      ""
+    end
+
+    # Heading title for the dialog
+    #
+    # @return [String]
+    def dialog_title
+      ""
+    end
+
+    # Text label for the url entry
+    #
+    # @return [String]
+    def entry_label
+      ""
+    end
+
+  private
+
+    # Determines wether the help text is shown
+    #
+    # @return [Boolean] true if the help text is not empty
+    #
+    # @see help_text
+    def show_help?
+      !help_text.empty?
+    end
+
+    # Determines wether the dialog title is shown
+    #
+    # @return [Boolean] true if the dialog title is not empty
+    #
+    # @see dialog_title
+    def show_heading?
+      !dialog_title.empty?
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/driver_update.rb 
new/yast2-installation-3.2.44/src/lib/installation/driver_update.rb
--- old/yast2-installation-3.2.38/src/lib/installation/driver_update.rb 
2017-05-04 15:58:44.509375667 +0200
+++ new/yast2-installation-3.2.44/src/lib/installation/driver_update.rb 
2017-06-01 16:47:44.362101535 +0200
@@ -79,7 +79,7 @@
     end
 
     # Command to apply the DUD disk to inst-sys
-    APPLY_CMD = "/etc/adddir %<source>s /".freeze # 
openSUSE/installation-images
+    APPLY_CMD = "/sbin/adddir %<source>s /".freeze # 
openSUSE/installation-images
 
     # Add files/directories to the inst-sys
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/update_repositories_finder.rb
 
new/yast2-installation-3.2.44/src/lib/installation/update_repositories_finder.rb
--- 
old/yast2-installation-3.2.38/src/lib/installation/update_repositories_finder.rb
    2017-05-04 15:58:44.597375667 +0200
+++ 
new/yast2-installation-3.2.44/src/lib/installation/update_repositories_finder.rb
    2017-06-01 16:47:44.366101535 +0200
@@ -25,9 +25,11 @@
 Yast.import "Mode"
 Yast.import "Profile"
 Yast.import "ProductFeatures"
-Yast.import "Report"
 
 module Installation
+  # Invalid registration URL error
+  class RegistrationURLError < URI::InvalidURIError; end
+
   # This class find repositories to be used by the self-update feature.
   class UpdateRepositoriesFinder
     include Yast::Logger
@@ -124,7 +126,12 @@
     #
     # @return [Array<URI>,false] self-update URLs or false in case of error
     def update_urls_from_connect
-      url = registration_url
+      begin
+        url = registration_url
+      rescue URI::InvalidURIError
+        raise RegistrationURLError
+      end
+
       return [] if url == :cancel
 
       custom_regserver = url != :scc
@@ -256,24 +263,6 @@
       )
     end
 
-    # Display a warning message about using the default update URL from
-    # control.xml when the registration server does not return any URL or 
fails.
-    # In AutoYaST mode the dialog is closed after a timeout.
-    def display_fallback_warning
-      # TRANSLATORS: error message
-      msg = _("<p>Cannot obtain the installer update repository URL\n" \
-        "from the registration server.</p>")
-
-      if update_url_from_control
-        # TRANSLATORS: part of an error message, %s is the default repository
-        # URL from control.xml
-        msg += _("<p>The default URL %s will be used.<p>") % 
update_url_from_control
-      end
-
-      # display the message in a RichText widget to wrap long lines
-      Yast::Report.LongWarning(msg)
-    end
-
     # Runs a block of code handling errors
     #
     # If errors should be shown, the helper {catch_registration_errors}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/update_repository.rb 
new/yast2-installation-3.2.44/src/lib/installation/update_repository.rb
--- old/yast2-installation-3.2.38/src/lib/installation/update_repository.rb     
2017-05-04 15:58:44.597375667 +0200
+++ new/yast2-installation-3.2.44/src/lib/installation/update_repository.rb     
2017-06-01 16:47:44.366101535 +0200
@@ -205,7 +205,7 @@
     # It happens in two phases (for each update/package):
     #
     # * Mount the squashfs filesystem
-    # * Add files/directories to inst-sys using the /etc/adddir script
+    # * Add files/directories to inst-sys using the /sbin/adddir script
     #
     # @note The current implementation creates one squashfs image per package
     # and mounting a squashfs image consumes one loop device (/dev/loop*).
@@ -389,7 +389,7 @@
     end
 
     # Command to apply the DUD disk to inst-sys
-    APPLY_CMD = "/etc/adddir %<source>s /".freeze # 
openSUSE/installation-images
+    APPLY_CMD = "/sbin/adddir %<source>s /".freeze # 
openSUSE/installation-images
 
     # Add files/directories to the inst-sys
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/widgets/hiding_place.rb 
new/yast2-installation-3.2.44/src/lib/installation/widgets/hiding_place.rb
--- old/yast2-installation-3.2.38/src/lib/installation/widgets/hiding_place.rb  
2017-05-04 15:58:44.597375667 +0200
+++ new/yast2-installation-3.2.44/src/lib/installation/widgets/hiding_place.rb  
2017-06-01 16:47:44.366101535 +0200
@@ -20,10 +20,9 @@
 # 
------------------------------------------------------------------------------
 
 require "yast"
+require "cwm/widget"
 require "installation/system_role"
 
-Yast.import "CWM"
-
 module Installation
   module Widgets
     # This class offers a placeholder that to hide/show a given widget
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/widgets/online_repos.rb 
new/yast2-installation-3.2.44/src/lib/installation/widgets/online_repos.rb
--- old/yast2-installation-3.2.38/src/lib/installation/widgets/online_repos.rb  
2017-05-04 15:58:44.597375667 +0200
+++ new/yast2-installation-3.2.44/src/lib/installation/widgets/online_repos.rb  
2017-06-01 16:47:44.366101535 +0200
@@ -10,7 +10,8 @@
       end
 
       def label
-        _("Configure On-line Repositories")
+        # TRANSLATORS: Push button label
+        _("Configure Online Repositories")
       end
 
       def handle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/src/lib/installation/widgets/system_roles_radio_buttons.rb
 
new/yast2-installation-3.2.44/src/lib/installation/widgets/system_roles_radio_buttons.rb
--- 
old/yast2-installation-3.2.38/src/lib/installation/widgets/system_roles_radio_buttons.rb
    2017-05-04 15:58:44.597375667 +0200
+++ 
new/yast2-installation-3.2.44/src/lib/installation/widgets/system_roles_radio_buttons.rb
    2017-06-01 16:47:44.366101535 +0200
@@ -30,6 +30,7 @@
 Yast.import "ProductControl"
 Yast.import "IP"
 Yast.import "Hostname"
+Yast.import "Pkg"
 
 module Installation
   module Widgets
@@ -37,14 +38,32 @@
       include SystemRoleReader
 
       alias_method :store_orig, :store
+
+      def initialize
+        # We need to handle all the events because otherwise the current
+        # selection is lost when the widget is redrawn.
+        # FIXME: It will not be needed once RadioButtons widget take care of it
+        self.handle_all_events = true
+      end
+
       def store
         # set flag to show custom patterns only if custom role selected
         CustomPatterns.show = value == "custom"
         store_orig
 
+        Yast::Packages.Reset([])
         if value == "custom"
           # for custom role do not use any desktop
           Yast::DefaultDesktop.SetDesktop(nil)
+          # But select patterns which have been defined e.g. in the
+          # software/default_patterns section in the control.xml file.
+          # (This can be done in the general default_patterns section or in
+          # the role specific default_patterns section.)
+          # Another possibility to set it are the default pattern settings
+          # in each product description defined by the "defaultpattern()"
+          # "Provides" dependency (FATE#320199).
+          Yast::Packages.SelectSystemPatterns(false)
+          Yast::Pkg.PkgSolve(false)
         else
           # force reset of Default Desktop, because it is cached and when going
           # forward and backward, it can be changed
@@ -52,6 +71,21 @@
         end
       end
 
+      def handle
+        ::Installation::SystemRole.select(value)
+
+        nil
+      end
+
+      def validate
+        return true if value
+
+        # TRANSLATORS: Popup error requesting to choose some option.
+        Yast::Popup.Error(_("You must choose some option before you 
continue."))
+
+        false
+      end
+
       def vspacing
         1
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.2.38/test/driver_update_test.rb 
new/yast2-installation-3.2.44/test/driver_update_test.rb
--- old/yast2-installation-3.2.38/test/driver_update_test.rb    2017-05-04 
15:58:44.713375667 +0200
+++ new/yast2-installation-3.2.44/test/driver_update_test.rb    2017-06-01 
16:47:44.382101535 +0200
@@ -88,7 +88,7 @@
 
       it "applies the driver update" do
         expect(Yast::SCR).to receive(:Execute)
-          .with(Yast::Path.new(".target.bash_output"), "/etc/adddir 
#{update.instsys_path} /")
+          .with(Yast::Path.new(".target.bash_output"), "/sbin/adddir 
#{update.instsys_path} /")
           .and_return("exit" => 0, "stdout" => "", "stderr" => "")
         update.apply
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/test/inst_install_inf_test.rb 
new/yast2-installation-3.2.44/test/inst_install_inf_test.rb
--- old/yast2-installation-3.2.38/test/inst_install_inf_test.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-installation-3.2.44/test/inst_install_inf_test.rb 2017-06-01 
16:47:44.386101535 +0200
@@ -0,0 +1,46 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper"
+require "installation/clients/inst_install_inf"
+
+describe Yast::InstInstallInfClient do
+
+  before do
+    allow(Yast::InstallInfConvertor.instance).to receive(:write_netconfig)
+    allow(Yast::SCR).to receive(:Read)
+    allow(Yast::SCR).to receive(:Write)
+    allow(Yast::Linuxrc).to receive(:InstallInf)
+    allow(Yast::Mode).to receive(:auto)
+  end
+
+  describe "#main" do
+    it "writes the network configuration given by linuxrc" do
+      expect(Yast::InstallInfConvertor.instance).to receive(:write_netconfig)
+
+      subject.main
+    end
+
+    context "when a regurl is provided by linuxrc" do
+      let(:invalid_url) { "http://wrong_url{}.com"; }
+      let(:valid_url) { "https://scc.custom.com"; }
+
+      it "allows the user to fix it it's invalid" do
+        expect(Yast::Linuxrc).to 
receive(:InstallInf).with("regurl").and_return(invalid_url)
+        expect(subject).to receive(:fix_regurl!).with(invalid_url)
+
+        subject.main
+      end
+
+      it "does nothing with the URL in case of valid" do
+        expect(Yast::Linuxrc).to 
receive(:InstallInf).with("regurl").and_return(valid_url)
+        expect(subject).to_not receive(:fix_regurl!)
+
+        subject.main
+      end
+    end
+
+    it "returns :next" do
+      expect(subject.main).to eq(:next)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/test/lib/update_repositories_finder_test.rb 
new/yast2-installation-3.2.44/test/lib/update_repositories_finder_test.rb
--- old/yast2-installation-3.2.38/test/lib/update_repositories_finder_test.rb   
2017-05-04 15:58:44.793375667 +0200
+++ new/yast2-installation-3.2.44/test/lib/update_repositories_finder_test.rb   
2017-06-01 16:47:44.386101535 +0200
@@ -3,6 +3,7 @@
 require_relative "../test_helper"
 require_relative "../support/fake_registration"
 require "installation/update_repositories_finder"
+require "uri"
 
 Yast.import "Linuxrc"
 
@@ -190,12 +191,14 @@
           end
         end
 
-        context "when a regurl was specified via Linuxrc" do
+        context "when a valid regurl was specified via Linuxrc" do
           let(:regurl) { "http://regserver.example.net"; }
 
           it "asks the SCC server for the updates URLs" do
             expect(registration_class).to receive(:new).with(regurl)
               .and_return(registration)
+            expect(finder).not_to receive(:update_from_control)
+
             finder.updates
           end
 
@@ -205,6 +208,16 @@
             finder.updates
           end
         end
+
+        context "when a invalid regurl was specified via Linuxrc" do
+          let(:regurl) { "http://wrong{}regserver.example.net"; }
+
+          it "raises an RegistrationURLError exception" do
+            expect(registration_class).not_to receive(:new).with(regurl)
+
+            expect { finder.updates }.to 
raise_error(Installation::RegistrationURLError)
+          end
+        end
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.38/test/lib/widgets/system_roles_radio_buttons_test.rb
 
new/yast2-installation-3.2.44/test/lib/widgets/system_roles_radio_buttons_test.rb
--- 
old/yast2-installation-3.2.38/test/lib/widgets/system_roles_radio_buttons_test.rb
   2017-05-04 15:58:44.793375667 +0200
+++ 
new/yast2-installation-3.2.44/test/lib/widgets/system_roles_radio_buttons_test.rb
   2017-06-01 16:47:44.386101535 +0200
@@ -5,9 +5,11 @@
 
 describe Installation::Widgets::SystemRolesRadioButtons do
   subject(:widget) { Installation::Widgets::SystemRolesRadioButtons.new }
+  let(:default) { nil }
 
   describe "#store" do
     before do
+      stub_const("Yast::Packages", double(SelectSystemPatterns: nil, Reset: 
nil))
       allow(widget).to receive(:value).and_return(value)
       allow(widget).to receive(:store_orig)
     end
@@ -32,4 +34,59 @@
       end
     end
   end
+
+  describe "#handle" do
+    it "selects the system role according to the current value" do
+      expect(Installation::SystemRole).to receive(:select).with(default)
+
+      widget.handle
+    end
+
+    it "returns nil" do
+      allow(Installation::SystemRole).to receive(:select)
+
+      expect(widget.handle).to eql(nil)
+    end
+  end
+
+  describe "#init" do
+    it "initializes the widget with the current system role" do
+      allow(Installation::SystemRole).to receive(:current).and_return("server")
+      expect(widget).to receive(:value=).with("server")
+
+      expect(widget.init).to eql("server")
+    end
+  end
+
+  describe "#validate" do
+    let(:value) { nil }
+
+    before do
+      allow(widget).to receive(:value).and_return(value)
+    end
+
+    context "when no option has been selected" do
+      it "opens an error popup" do
+        expect(Yast::Popup).to receive(:Error)
+
+        expect(widget.validate).to eql(false)
+      end
+
+      it "returns false" do
+        expect(Yast::Popup).to receive(:Error)
+
+        expect(widget.validate).to eql(false)
+      end
+    end
+
+    context "when the widget has some value selected" do
+      let(:value) { "server" }
+
+      it "returns true" do
+        expect(Yast::Popup).to_not receive(:Error)
+
+        expect(widget.validate).to eql(true)
+      end
+    end
+  end
 end


Reply via email to