Hello community,

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

Package is "yast2-installation"

Wed Aug  2 11:26:55 2017 rev:389 rq:513533 version:3.3.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2017-07-02 13:32:19.160631907 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes   
    2017-08-02 11:26:58.140349940 +0200
@@ -1,0 +2,26 @@
+Mon Jul 31 08:16:23 UTC 2017 - [email protected]
+
+- New client for product selection (FATE#323450)
+- 3.3.3
+
+-------------------------------------------------------------------
+Wed Jul 26 14:42:15 UTC 2017 - [email protected]
+
+- drop reading /content (FATE#322386)
+- 3.3.2
+
+-------------------------------------------------------------------
+Thu Jun 29 11:51:55 UTC 2017 - [email protected]
+
+- openSUSE only: reword title of desktop selection dialog
+  (boo#1045180)
+- 3.3.1
+
+-------------------------------------------------------------------
+Thu Jun 29 08:40:43 UTC 2017 - [email protected]
+
+- when custom role is selected in desktop selection
+  keep default value in /etc/sysconfig/windowmanager (bsc#1030873)
+- 3.3.0
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.oluJi1/_old  2017-08-02 11:26:58.712269082 +0200
+++ /var/tmp/diff_new_pack.oluJi1/_new  2017-08-02 11:26:58.716268517 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.2.46
+Version:        3.3.3
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-installation-3.2.46.tar.bz2 -> yast2-installation-3.3.3.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/package/yast2-installation.changes 
new/yast2-installation-3.3.3/package/yast2-installation.changes
--- old/yast2-installation-3.2.46/package/yast2-installation.changes    
2017-06-26 17:11:22.374338830 +0200
+++ new/yast2-installation-3.3.3/package/yast2-installation.changes     
2017-07-31 15:08:34.387704126 +0200
@@ -1,4 +1,30 @@
 -------------------------------------------------------------------
+Mon Jul 31 08:16:23 UTC 2017 - [email protected]
+
+- New client for product selection (FATE#323450)
+- 3.3.3
+
+-------------------------------------------------------------------
+Wed Jul 26 14:42:15 UTC 2017 - [email protected]
+
+- drop reading /content (FATE#322386)
+- 3.3.2
+
+-------------------------------------------------------------------
+Thu Jun 29 11:51:55 UTC 2017 - [email protected]
+
+- openSUSE only: reword title of desktop selection dialog
+  (boo#1045180)
+- 3.3.1
+
+-------------------------------------------------------------------
+Thu Jun 29 08:40:43 UTC 2017 - [email protected]
+
+- when custom role is selected in desktop selection
+  keep default value in /etc/sysconfig/windowmanager (bsc#1030873)
+- 3.3.0
+
+-------------------------------------------------------------------
 Mon Jun 26 11:11:19 CEST 2017 - [email protected]
 
 - Allow different mount point for home partition (Fate#323532)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/package/yast2-installation.spec 
new/yast2-installation-3.3.3/package/yast2-installation.spec
--- old/yast2-installation-3.2.46/package/yast2-installation.spec       
2017-06-26 17:11:22.374338830 +0200
+++ new/yast2-installation-3.3.3/package/yast2-installation.spec        
2017-07-31 15:08:34.387704126 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.2.46
+Version:        3.3.3
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/clients/desktop_finish.rb 
new/yast2-installation-3.3.3/src/clients/desktop_finish.rb
--- old/yast2-installation-3.2.46/src/clients/desktop_finish.rb 2017-06-26 
17:11:22.406338830 +0200
+++ new/yast2-installation-3.3.3/src/clients/desktop_finish.rb  2017-07-31 
15:08:34.467704126 +0200
@@ -1,2 +1,2 @@
 require "installation/clients/desktop_finish"
-Yast::DesktopFinishClient.new.main
+Yast::DesktopFinishClient.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/clients/inst_product_selector.rb 
new/yast2-installation-3.3.3/src/clients/inst_product_selector.rb
--- old/yast2-installation-3.2.46/src/clients/inst_product_selector.rb  
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/src/clients/inst_product_selector.rb   
2017-07-31 15:08:34.495704126 +0200
@@ -0,0 +1,5 @@
+require "yast"
+
+require "installation/dialogs/product_selection"
+
+::Installation::Dialogs::ProductSelection.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/clients/desktop_finish.rb 
new/yast2-installation-3.3.3/src/lib/installation/clients/desktop_finish.rb
--- 
old/yast2-installation-3.2.46/src/lib/installation/clients/desktop_finish.rb    
    2017-06-26 17:11:22.418338830 +0200
+++ new/yast2-installation-3.3.3/src/lib/installation/clients/desktop_finish.rb 
2017-07-31 15:08:34.555704126 +0200
@@ -31,230 +31,98 @@
 # $Id$
 #
 
-module Yast
-  class DesktopFinishClient < Client
-    def main
-      Yast.import "Pkg"
+require "installation/finish_client"
+require "yast2/execute"
+
+Yast.import "DefaultDesktop"
+Yast.import "ProductFeatures"
+Yast.import "FileUtils"
 
+module Yast
+  class DesktopFinishClient < ::Installation::FinishClient
+    def initialize
       textdomain "installation"
+    end
+
+    def title
+      _("Initializing default window manager...")
+    end
+
+    def modes
+      [:installation, :autoinst]
+    end
+
+    def write
+      selected_desktop = DefaultDesktop.Desktop
+      log.info "Selected desktop: #{selected_desktop}"
+
+      if selected_desktop.nil?
+        log.info "no desktop set, skipping."
+        return nil
+      end
+
+      desktop_map = DefaultDesktop.GetAllDesktopsMap[selected_desktop]
+      raise "Selected desktop '#{selected_desktop}' missing in desktops map" 
unless desktop_map
+
+      log.info "selected desktop #{desktop_map}"
 
-      Yast.import "DefaultDesktop"
-      Yast.import "Directory"
-      Yast.import "Mode"
-      Yast.import "ProductFeatures"
-      Yast.import "FileUtils"
-      Yast.import "String"
-
-      @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
+      default_dm = desktop_map["logon"] || ""
+      default_wm = desktop_map["desktop"] || ""
+      default_cursor = desktop_map["cursor"] || ""
+
+      SCR.Write(path(".sysconfig.windowmanager.DEFAULT_WM"), default_wm)
+      SCR.Write(
+        path(".sysconfig.windowmanager.X_MOUSE_CURSOR"),
+        default_cursor
+      )
+      SCR.Write(path(".sysconfig.windowmanager"), nil)
+
+      dpmng_file = "/etc/sysconfig/displaymanager"
+      # Creates an empty sysconfig file if it doesn't exist
+      if !FileUtils.Exists(dpmng_file) &&
+          FileUtils.Exists("/usr/bin/touch")
+        log.info "Creating file #{dpmng_file}"
+        Yast::Execute.on_target("/usr/bin/touch", dpmng_file)
       end
 
-      Builtins.y2milestone("starting desktop_finish")
-      Builtins.y2debug("func=%1", @func)
-      Builtins.y2debug("param=%1", @param)
-
-      if @func == "Info"
-        return {
-          "steps" => 1,
-          # progress step title
-          "title" => _(
-            "Initializing default window manager..."
-          ),
-          "when"  => [:installation, :autoinst]
-        }
-      elsif @func == "Write"
-        # this detects WM and DM according to selected patterns and
-        # installed packages
-        if !Mode.update
-          @dd_map = DefaultDesktop.GetAllDesktopsMap
-
-          @selected_desktop = DefaultDesktop.Desktop
-          Builtins.y2milestone("Selected desktop: %1", @selected_desktop)
-
-          if @selected_desktop.nil? || @selected_desktop == ""
-            @selected_desktop = "gnome"
-          end
-
-          @default_dm = ""
-          @default_wm = ""
-          @default_cursor = ""
-
-          @desktop_order = []
-          @dorder_map = {}
-
-          # build a map $[desktop_id -> desktop_order]
-          Builtins.foreach(@dd_map) do |desktop_id, desktop_def|
-            @desktop_order = Builtins.add(@desktop_order, desktop_id)
-            Ops.set(
-              @dorder_map,
-              desktop_id,
-              desktop_def["order"] || 9999
-            )
-          end
-
-          # sort the desktops according to their order
-          @desktop_order = Builtins.sort(@desktop_order) do |desktop_x, 
desktop_y|
-            Ops.less_than(
-              Ops.get(@dorder_map, desktop_x, 9999),
-              Ops.get(@dorder_map, desktop_y, 9999)
-            )
-          end
-
-          # the default one is always the first one
-          @desktop_order = Builtins.prepend(
-            @desktop_order,
-            DefaultDesktop.Desktop
-          )
-          Builtins.y2milestone("Desktop order: %1", @desktop_order)
-
-          @desktop_found = false
-
-          Builtins.foreach(@desktop_order) do |d|
-            raise Break if @desktop_found
-            Builtins.y2milestone("Checking desktop: %1", d)
-            Builtins.foreach(Ops.get_list(@dd_map, [d, "packages"], [])) do 
|package|
-              if Pkg.IsProvided(package) &&
-                  (Pkg.PkgInstalled(package) || Pkg.IsSelected(package))
-                Builtins.y2milestone(
-                  "Package %1 selected or installed, desktop %2 matches",
-                  package,
-                  d
-                )
-                @desktop_found = true
-
-                @default_dm = Ops.get_string(@dd_map, [d, "logon"], "")
-                Builtins.y2milestone(
-                  "Setting logon manager %1 - package selected",
-                  @default_dm
-                )
-
-                @default_wm = Ops.get_string(@dd_map, [d, "desktop"], "")
-                Builtins.y2milestone(
-                  "Setting window manager %1 - package selected",
-                  @default_wm
-                )
-
-                @default_cursor = Ops.get_string(
-                  @dd_map,
-                  [d, "cursor"],
-                  @default_cursor
-                )
-                Builtins.y2milestone(
-                  "Setting cursor theme %1 - package selected",
-                  @default_cursor
-                )
-              else
-                Builtins.y2milestone(
-                  "Package %1 for desktop %2 neither selected nor installed, 
trying next desktop...",
-                  package,
-                  d
-                )
-              end
-            end
-          end
-
-          Builtins.y2milestone("Default desktop: %1", @default_wm)
-          Builtins.y2milestone("Default logon manager: %1", @default_dm)
-          Builtins.y2milestone("Default cursor theme: %1", @default_cursor)
-
-          SCR.Write(path(".sysconfig.windowmanager.DEFAULT_WM"), @default_wm)
-          SCR.Write(
-            path(".sysconfig.windowmanager.X_MOUSE_CURSOR"),
-            @default_cursor
-          )
-          SCR.Write(path(".sysconfig.windowmanager"), nil)
-
-          @dpmng_file = "/etc/sysconfig/displaymanager"
-          # Creates an empty sysconfig file if it doesn't exist
-          if !FileUtils.Exists(@dpmng_file) &&
-              FileUtils.Exists("/usr/bin/touch")
-            Builtins.y2milestone(
-              "Creating file %1: %2",
-              @dpmng_file,
-              SCR.Execute(
-                path(".target.bash"),
-                Builtins.sformat(
-                  "/usr/bin/touch '%1'",
-                  String.Quote(@dpmng_file)
-                )
-              )
-            )
-          end
-
-          # this one should be obsolete nowadays but maybe KDE still uses it
-          @dm_shutdown = ProductFeatures.GetStringFeature(
-            "globals",
-            "displaymanager_shutdown"
-          )
-          Builtins.y2milestone("Logon manager shutdown: %1", @dm_shutdown)
-          if !@dm_shutdown.nil? && @dm_shutdown != ""
-            SCR.Write(
-              path(".sysconfig.displaymanager.DISPLAYMANAGER_SHUTDOWN"),
-              @dm_shutdown
-            )
-          end
-
-          Builtins.y2milestone(
-            "sysconfig/displaymanager/DISPLAYMANAGER=%1",
-            @default_dm
-          )
-          SCR.Write(
-            path(".sysconfig.displaymanager.DISPLAYMANAGER"),
-            @default_dm
-          )
-          SCR.Write(path(".sysconfig.displaymanager"), nil)
-
-          # bnc #431158, patch done by lnussel
-          @polkit_default_privs = ProductFeatures.GetStringFeature(
-            "globals",
-            "polkit_default_privs"
-          )
-          if !@polkit_default_privs.nil? && @polkit_default_privs != ""
-            Builtins.y2milestone(
-              "Writing %1 to POLKIT_DEFAULT_PRIVS",
-              @polkit_default_privs
-            )
-            SCR.Write(
-              path(".sysconfig.security.POLKIT_DEFAULT_PRIVS"),
-              @polkit_default_privs
-            )
-            # BNC #440182
-            # Flush the SCR cache before calling the script
-            SCR.Write(path(".sysconfig.security"), nil)
-
-            @ret2 = Convert.to_map(
-              SCR.Execute(
-                path(".target.bash_output"),
-                # check whether it exists
-                # give some feedback
-                # It's dozens of lines...
-                "test -x /sbin/set_polkit_default_privs && " \
-                  "echo /sbin/set_polkit_default_privs && " \
-                  "/sbin/set_polkit_default_privs | wc -l && " \
-                  "echo 'Done'"
-              )
-            )
-            Builtins.y2milestone("Command returned: %1", @ret2)
-          end
-        end
-      else
-        Builtins.y2error("unknown function: %1", @func)
-        @ret = nil
+      SCR.Write(
+        path(".sysconfig.displaymanager.DISPLAYMANAGER"),
+        default_dm
+      )
+      SCR.Write(path(".sysconfig.displaymanager"), nil)
+
+      # bnc #431158, patch done by lnussel
+      polkit_default_privs = ProductFeatures.GetStringFeature(
+        "globals",
+        "polkit_default_privs"
+      )
+      if !polkit_default_privs.nil? && polkit_default_privs != ""
+        Builtins.y2milestone(
+          "Writing %1 to POLKIT_DEFAULT_PRIVS",
+          polkit_default_privs
+        )
+        SCR.Write(
+          path(".sysconfig.security.POLKIT_DEFAULT_PRIVS"),
+          polkit_default_privs
+        )
+        # BNC #440182
+        # Flush the SCR cache before calling the script
+        SCR.Write(path(".sysconfig.security"), nil)
+
+        ret2 = SCR.Execute(
+          path(".target.bash_output"),
+          # check whether it exists
+          # give some feedback
+          # It's dozens of lines...
+          "test -x /sbin/set_polkit_default_privs && " \
+            "echo /sbin/set_polkit_default_privs && " \
+            "/sbin/set_polkit_default_privs | wc -l && " \
+            "echo 'Done'"
+        )
+        log.info "Command returned: #{ret2}"
       end
 
-      Builtins.y2debug("ret=%1", @ret)
-      Builtins.y2milestone("desktop_finish finished")
-      deep_copy(@ret)
+      nil
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/clients/inst_install_inf.rb 
new/yast2-installation-3.3.3/src/lib/installation/clients/inst_install_inf.rb
--- 
old/yast2-installation-3.2.46/src/lib/installation/clients/inst_install_inf.rb  
    2017-06-26 17:11:22.466338830 +0200
+++ 
new/yast2-installation-3.3.3/src/lib/installation/clients/inst_install_inf.rb   
    2017-07-31 15:08:34.623704126 +0200
@@ -50,7 +50,7 @@
         case new_url
         when :cancel
           if Popup.YesNo(_("If you decide to cancel, the custom URL\n" \
-                         "will be completelly ignored.\n\n" \
+                         "will be completely ignored.\n\n" \
                          "Really cancel URL modification?"))
             regurl = nil
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/dialogs/desktop_roles.rb 
new/yast2-installation-3.3.3/src/lib/installation/dialogs/desktop_roles.rb
--- old/yast2-installation-3.2.46/src/lib/installation/dialogs/desktop_roles.rb 
2017-06-26 17:11:22.470338830 +0200
+++ new/yast2-installation-3.3.3/src/lib/installation/dialogs/desktop_roles.rb  
2017-07-31 15:08:34.691704126 +0200
@@ -22,7 +22,7 @@
       loop do
         ret = Yast::CWM.show(
           content,
-          caption:        _("Computer Role"),
+          caption:        _("User Interface"),
           skip_store_for: [:redraw]
         )
         break if ret != :redraw
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/dialogs/product_selection.rb 
new/yast2-installation-3.3.3/src/lib/installation/dialogs/product_selection.rb
--- 
old/yast2-installation-3.2.46/src/lib/installation/dialogs/product_selection.rb 
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-installation-3.3.3/src/lib/installation/dialogs/product_selection.rb  
    2017-07-31 15:08:34.691704126 +0200
@@ -0,0 +1,57 @@
+require "yast"
+
+require "cwm/dialog"
+require "installation/widgets/product_selector"
+require "installation/product_reader"
+
+Yast.import "ProductControl"
+Yast.import "WorkflowManager"
+
+module Installation
+  module Dialogs
+    # The dialog is used to select from available product that can do system 
installation.
+    # Currently it is mainly used for LeanOS that have on one media more 
products.
+    class ProductSelection < CWM::Dialog
+      class << self
+        attr_accessor :selected_package
+      end
+
+      def initialize
+        textdomain "installation"
+      end
+
+      def title
+        _("Product Selection")
+      end
+
+      def products
+        ProductReader.available_base_products
+      end
+
+      def selector
+        @selector ||= Widgets::ProductSelector.new(products)
+      end
+
+      def contents
+        VBox(selector)
+      end
+
+      # enhances default run by additional action if next is pressed
+      def run
+        return if super != :next
+
+        # remove already selected if it is not first run of dialog
+        if self.class.selected_package
+          Yast::WorkflowManager.RemoveWorkflow(:package, 0, 
self.class.selected_package)
+        end
+        product = selector.product
+        Yast::WorkflowManager.AddWorkflow(:package, 0, 
product.installation_package)
+        Yast::WorkflowManager.MergeWorkflows
+        Yast::WorkflowManager.RedrawWizardSteps
+        self.class.selected_package = product.installation_package
+        # run new steps for product
+        Yast::ProductControl.RunFrom(Yast::ProductControl.CurrentStep + 1, 
true)
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/product.rb 
new/yast2-installation-3.3.3/src/lib/installation/product.rb
--- old/yast2-installation-3.2.46/src/lib/installation/product.rb       
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/src/lib/installation/product.rb        
2017-07-31 15:08:34.691704126 +0200
@@ -0,0 +1,54 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 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 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.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+Yast.import "Pkg"
+
+module Installation
+  # Simple Libzypp Product wrapper
+  class Product
+    include Yast::Logger
+
+    # @return [String] the internal libzypp product name
+    attr_reader :name
+    # @return [String] the human readable product label
+    attr_reader :label
+    # @return [Integer, nil] the display order (nil if not defined)
+    attr_reader :order
+    # package including installation.xml for install on top of lean os
+    attr_accessor :installation_package
+
+    # @param name [String] name of the product resolvable
+    # @param label [String] user visible product label
+    # @param order [Integer,nil] the display order
+    def initialize(name, label, order: nil)
+      @name = name
+      @label = label
+      @order = order
+    end
+
+    # select the product to install
+    # @return [Boolean] true if the product has been sucessfully selected
+    def select
+      log.info "Selecting product #{name} to install"
+      Yast::Pkg.ResolvableInstall(name, :product, "")
+    end
+
+    # is the product selected to install?
+    # @return [Boolean] true if it is selected
+    def selected?
+      Yast::Pkg.ResolvableProperties(name, :product, "").any? do |res|
+        res["status"] == :selected
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/product_reader.rb 
new/yast2-installation-3.3.3/src/lib/installation/product_reader.rb
--- old/yast2-installation-3.2.46/src/lib/installation/product_reader.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/src/lib/installation/product_reader.rb 
2017-07-31 15:08:34.691704126 +0200
@@ -0,0 +1,102 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 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 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.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "installation/product"
+require "installation/product_sorter"
+
+Yast.import "Pkg"
+
+module Installation
+  # Read the product information from libzypp
+  class ProductReader
+    include Yast::Logger
+
+    # In installation Read the available libzypp base products for installation
+    # @return [Array<Installation::Product>] the found available base products,
+    #   the products are sorted by the 'displayorder' provides value
+    def self.available_base_products
+      products = base_products
+
+      installation_mapping = installation_package_mapping
+      result = products.map do |prod|
+        label = prod["display_name"] || prod["short_name"] || prod["name"]
+        prod_pkg = product_package(prod["product_package"], prod["source"])
+
+        if prod_pkg
+          prod_pkg["deps"].find { |dep| dep["provides"] =~ 
/\Adisplayorder\(\s*([0-9]+)\s*\)\z/ }
+          displayorder = Regexp.last_match[1].to_i if Regexp.last_match
+        end
+
+        product = Product.new(prod["name"], label, order: displayorder)
+        product.installation_package = installation_mapping[product.name]
+        product
+      end
+
+      # only installable products
+      result.select!(&:installation_package)
+
+      # sort the products
+      result.sort!(&::Installation::PRODUCT_SORTER)
+
+      log.info "available base products #{result}"
+
+      result
+    end
+
+    def self.product_package(name, repo_id)
+      return nil unless name
+      Yast::Pkg.ResolvableDependencies(name, :package, "").find do |prod|
+        prod["source"] == repo_id
+      end
+    end
+
+    # read the available base products
+    # @return [Array<Hash>] pkg-bindings data structure
+    def self.base_products
+      products = Yast::Pkg.ResolvableProperties("", :product, "").select do 
|prod|
+        prod["source"] == 0
+      end
+
+      # remove duplicates, there migth be different flavors ("DVD"/"POOL")
+      # or archs (x86_64/i586)
+      products.uniq! { |prod| prod["name"] }
+
+      log.info "Found products: #{products.map { |prod| prod["name"] }}"
+
+      products
+    end
+
+    def self.installation_package_mapping
+      installation_packages = 
Yast::Pkg.PkgQueryProvides("system-installation()")
+
+      mapping = {}
+      installation_packages.each do |list|
+        pkg_name = list.first
+        # There can be more instances of same package in different version. We 
except that one
+        # package provide same product installation. So we just pick the first 
one.
+        dependencies = Yast::Pkg.ResolvableDependencies(pkg_name, :package, 
"").first["deps"]
+        install_provide = dependencies.find do |d|
+          d["provides"] && d["provides"].match(/system-installation\(\)/)
+        end
+
+        # parse product name from provides. Format of provide is
+        # `system-installation() = <product_name>`
+        product_name = 
install_provide["provides"][/system-installation\(\)\s*=\s*(\S+)/, 1]
+        log.info "package #{pkg_name} install product #{product_name}"
+        mapping[product_name] = pkg_name
+      end
+
+      mapping
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/product_sorter.rb 
new/yast2-installation-3.3.3/src/lib/installation/product_sorter.rb
--- old/yast2-installation-3.2.46/src/lib/installation/product_sorter.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/src/lib/installation/product_sorter.rb 
2017-07-31 15:08:34.691704126 +0200
@@ -0,0 +1,30 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 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 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.
+# 
------------------------------------------------------------------------------
+
+module Installation
+  # Sorter for sorting Products in required display order
+  # @param x [Installation::Product] the first item to compare
+  # @param y [Installation::Product] the second item to compare
+  PRODUCT_SORTER = proc do |x, y|
+    # both products have defined order
+    if x.order && y.order
+      x.order <=> y.order
+    # only one product has defined order
+    elsif x.order || y.order
+      # product with defined order first
+      x.order ? -1 : 1
+    else
+      # none product has defined order, sort by label
+      x.label <=> y.label
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/src/lib/installation/widgets/product_selector.rb 
new/yast2-installation-3.3.3/src/lib/installation/widgets/product_selector.rb
--- 
old/yast2-installation-3.2.46/src/lib/installation/widgets/product_selector.rb  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-installation-3.3.3/src/lib/installation/widgets/product_selector.rb   
    2017-07-31 15:08:34.711704126 +0200
@@ -0,0 +1,59 @@
+require "yast"
+Yast.import "Pkg"
+Yast.import "Popup"
+
+require "cwm/common_widgets"
+
+module Installation
+  module Widgets
+    class ProductSelector < CWM::RadioButtons
+      include Yast::Logger
+
+      attr_reader :items, :products
+      attr_reader :product
+
+      # @param products [Array<Installation::Product>] to display
+      def initialize(products)
+        @products = products
+        @items = products.map { |p| [p.name, p.label] }
+        textdomain "installation"
+      end
+
+      def hspacing
+        1
+      end
+
+      def label
+        _("Product to Install")
+      end
+
+      def init
+        selected = products.find(&:selected?)
+        return unless selected
+
+        self.value = selected.name
+      end
+
+      def store
+        log.info "Selected product: #{value}"
+        @product = products.find { |p| p.name == value }
+        log.info "Found product: #{@product}"
+
+        return unless @product
+
+        # reset both YaST and user selection (when going back or any products
+        # selected by YaST in the previous steps)
+        Yast::Pkg.PkgApplReset
+        Yast::Pkg.PkgReset
+        @product.select
+      end
+
+      def validation
+        return true if value
+
+        Yast::Popup.Error(_("Please select a product to install."))
+        false
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/startup/First-Stage/F04-language 
new/yast2-installation-3.3.3/startup/First-Stage/F04-language
--- old/yast2-installation-3.2.46/startup/First-Stage/F04-language      
2017-06-26 17:11:22.570338830 +0200
+++ new/yast2-installation-3.3.3/startup/First-Stage/F04-language       
2017-07-31 15:08:34.735704126 +0200
@@ -6,10 +6,6 @@
 # 4) set language environment
 #---------------------------------------------
 LANGUAGE=en_US
-infofile=/content
-if [ -f $infofile ];then
-       LANGUAGE=`sed -n 's/^LANGUAGE \([^ ]*\)/\1/p' $infofile`
-fi
 if [ ! "$Locale" = "" ];then
        LANGUAGE=$Locale
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/desktop_finish_test.rb 
new/yast2-installation-3.3.3/test/desktop_finish_test.rb
--- old/yast2-installation-3.2.46/test/desktop_finish_test.rb   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/desktop_finish_test.rb    2017-07-31 
15:08:34.795704126 +0200
@@ -0,0 +1,68 @@
+require_relative "test_helper"
+require "installation/clients/desktop_finish"
+
+describe Yast::DesktopFinishClient do
+  describe "#title" do
+    it "returns translated string" do
+      expect(subject.title).to be_a(::String)
+    end
+  end
+
+  describe "#modes" do
+    it "runs in installation" do
+      expect(subject.modes).to include(:installation)
+    end
+
+    it "runs in autoinstallation" do
+      expect(subject.modes).to include(:autoinst)
+    end
+
+    it "does not run in update" do
+      expect(subject.modes).to_not include(:update)
+    end
+  end
+
+  describe "#write" do
+    before do
+      allow(Yast::DefaultDesktop).to receive(:Desktop).and_return("gnome")
+      allow(Yast::DefaultDesktop).to receive(:GetAllDesktopsMap)
+        .and_return("gnome" => {
+                      "logon"   => "gdm",
+                      "cursor"  => "DMZ",
+                      "desktop" => "gnome"
+                    })
+
+      allow(Yast::SCR).to receive(:Write)
+      allow(Yast::Execute).to receive(:on_target)
+    end
+
+    it "do nothing if no desktop is selected" do
+      allow(Yast::DefaultDesktop).to receive(:Desktop).and_return(nil)
+      expect(Yast::SCR).to_not receive(:Write)
+      expect(Yast::Execute).to_not receive(:on_target)
+
+      subject.write
+    end
+
+    it "writes default wm for selected desktop" do
+      expect(Yast::SCR).to receive(:Write)
+        .with(path(".sysconfig.windowmanager.DEFAULT_WM"), "gnome")
+
+      subject.write
+    end
+
+    it "writes cursor for selected desktop" do
+      expect(Yast::SCR).to receive(:Write)
+        .with(path(".sysconfig.windowmanager.X_MOUSE_CURSOR"), "DMZ")
+
+      subject.write
+    end
+
+    it "writes desktop manager for selected desktop" do
+      expect(Yast::SCR).to receive(:Write)
+        .with(path(".sysconfig.displaymanager.DISPLAYMANAGER"), "gdm")
+
+      subject.write
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/dialogs/product_selection_test.rb 
new/yast2-installation-3.3.3/test/dialogs/product_selection_test.rb
--- old/yast2-installation-3.2.46/test/dialogs/product_selection_test.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/dialogs/product_selection_test.rb 
2017-07-31 15:08:34.795704126 +0200
@@ -0,0 +1,9 @@
+require_relative "../test_helper"
+
+require "cwm/rspec"
+
+require "installation/dialogs/product_selection"
+
+describe ::Installation::Dialogs::ProductSelection do
+  include_examples "CWM::Dialog"
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/fixtures/products/sles15.yml 
new/yast2-installation-3.3.3/test/fixtures/products/sles15.yml
--- old/yast2-installation-3.2.46/test/fixtures/products/sles15.yml     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/fixtures/products/sles15.yml      
2017-07-31 15:08:34.799704126 +0200
@@ -0,0 +1,42 @@
+---
+- arch: x86_64
+  category: addon
+  description: |-
+    SUSE Linux Enterprise offers a comprehensive
+            suite of products built on a single code base.
+            The platform addresses business needs from
+            the smallest thin-client devices to the world's
+            most powerful high-performance computing
+            and mainframe servers. SUSE Linux Enterprise
+            offers common management tools and technology
+            certifications across the platform, and
+            each product is enterprise-class.
+  display_name: SUSE Linux Enterprise Server 15 Alpha1
+  download_size: 0
+  flags: []
+  flavor: ''
+  inst_size: 0
+  locked: false
+  medium_nr: 0
+  name: SLES
+  on_system_by_user: false
+  product_file: SLES.prod
+  product_line: ''
+  product_package: sles-release
+  register_release: ''
+  register_target: sle-15-x86_64
+  relnotes_url: 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/release-notes-sles.rpm
+  relnotes_urls:
+  - 
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/release-notes-sles.rpm
+  short_name: SLES15
+  source: 0
+  status: :selected
+  summary: SUSE Linux Enterprise Server 15 Alpha1
+  transact_by: :app_high
+  type: addon
+  update_urls: []
+  vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
+  version: 15-0
+  version_epoch: 
+  version_release: '0'
+  version_version: '15'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/fixtures/products/sles15_release_deps.yml 
new/yast2-installation-3.3.3/test/fixtures/products/sles15_release_deps.yml
--- 
old/yast2-installation-3.2.46/test/fixtures/products/sles15_release_deps.yml    
    1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/fixtures/products/sles15_release_deps.yml 
2017-07-31 15:08:34.799704126 +0200
@@ -0,0 +1,360 @@
+---
+- arch: x86_64
+  dependencies:
+  - dep_kind: conflicts
+    name: sle-we-release
+    res_kind: package
+  - dep_kind: conflicts
+    name: sled-release
+    res_kind: package
+  - dep_kind: conflicts
+    name: leanos-release
+    res_kind: package
+  - dep_kind: obsoletes
+    name: leanos-release
+    res_kind: package
+  - dep_kind: prerequires
+    name: glibc
+    res_kind: package
+  - dep_kind: prerequires
+    name: bash
+    res_kind: package
+  - dep_kind: prerequires
+    name: coreutils
+    res_kind: package
+  - dep_kind: provides
+    name: sle-we-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-moleculars-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-server-applications-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-scripting-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-legacy-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-development-tools-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-desktop-applications-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-basesystem-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-geo-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-scripting-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-legacy-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-development-tools-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-desktop-applications-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-basesystem-release
+    res_kind: package
+  - dep_kind: provides
+    name: SLES-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: leanos-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-moleculars-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-geo-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-release
+    res_kind: package
+  - dep_kind: provides
+    name: sled-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-server-applications-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-we-release
+    res_kind: package
+  - dep_kind: provides
+    name: openSUSE-release
+    res_kind: package
+  - dep_kind: provides
+    name: sles-release
+    res_kind: package
+  - dep_kind: provides
+    name: SLED-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: leanos-SP1-migration
+    res_kind: package
+  - dep_kind: recommends
+    name: branding-SLE
+    res_kind: package
+  - dep_kind: recommends
+    name: branding-openSUSE
+    res_kind: package
+  - dep_kind: requires
+    name: glibc
+    res_kind: package
+  - dep_kind: requires
+    name: coreutils
+    res_kind: package
+  - dep_kind: requires
+    name: issue-generator
+    res_kind: package
+  - dep_kind: requires
+    name: bash
+    res_kind: package
+  deps:
+  - conflicts: leanos-release
+  - conflicts: sled-release
+  - conflicts: kernel < 4.4
+  - conflicts: perl-Bootloader < 0.904
+  - obsoletes: leanos-release
+  - prerequires: "/bin/sh"
+  - prerequires: coreutils
+  - prerequires: glibc >= 2.22
+  - provides: product-endoflife()
+  - provides: distribution-release
+  - provides: displayorder(200)
+  - provides: sles-release-15
+  - provides: product(SUSE_SLE) = 15
+  - provides: product-register-target() = sle%2D15%2Dx86_64
+  - provides: product(SUSE_SLE-SP0) = 15
+  - provides: product(SUSE_SLE) = 15-80.1
+  - provides: product(SUSE_SLE-SP0) = 15-80.1
+  - provides: product(SLES) = 15-0
+  - provides: product() = SLES
+  - provides: product-cpeid() = cpe%3A%2Fo%3Asuse%3Asles%3A15
+  - provides: product-label() = SLES15
+  - provides: config(sles-release) = 15-80.1
+  - provides: sles-release = 15-80.1
+  - provides: product-url(releasenotes) = 
https%3A%2F%2Fwww.suse.com%2Freleasenotes%2Fx86_64%2FSUSE%2DSLES%2F15%2Frelease%2Dnotes%2Dsles.rpm
+  - provides: sles-release(x86-64) = 15-80.1
+  - recommends: branding
+  - requires: issue-generator
+  - requires: "/bin/sh"
+  - requires: coreutils
+  - requires: glibc >= 2.22
+  description: |-
+    SUSE Linux Enterprise offers a comprehensive
+            suite of products built on a single code base.
+            The platform addresses business needs from
+            the smallest thin-client devices to the world's
+            most powerful high-performance computing
+            and mainframe servers. SUSE Linux Enterprise
+            offers common management tools and technology
+            certifications across the platform, and
+            each product is enterprise-class.
+  download_size: 23849
+  inst_size: 76384
+  location: sles-release-15-80.1.x86_64.rpm
+  locked: false
+  medium_nr: 0
+  name: sles-release
+  on_system_by_user: false
+  path: "./x86_64/sles-release-15-80.1.x86_64.rpm"
+  source: 0
+  status: :available
+  summary: SUSE Linux Enterprise Server 15 Alpha1
+  transact_by: :solver
+  vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
+  version: 15-80.1
+  version_epoch: 
+  version_release: '80.1'
+  version_version: '15'
+- arch: i586
+  dependencies:
+  - dep_kind: conflicts
+    name: sle-we-release
+    res_kind: package
+  - dep_kind: conflicts
+    name: sled-release
+    res_kind: package
+  - dep_kind: conflicts
+    name: leanos-release
+    res_kind: package
+  - dep_kind: obsoletes
+    name: leanos-release
+    res_kind: package
+  - dep_kind: prerequires
+    name: glibc
+    res_kind: package
+  - dep_kind: prerequires
+    name: bash
+    res_kind: package
+  - dep_kind: prerequires
+    name: coreutils
+    res_kind: package
+  - dep_kind: provides
+    name: sle-we-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-moleculars-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-server-applications-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-scripting-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-legacy-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-development-tools-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-desktop-applications-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-basesystem-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-geo-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-scripting-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-legacy-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-development-tools-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-desktop-applications-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-basesystem-release
+    res_kind: package
+  - dep_kind: provides
+    name: SLES-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: leanos-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-moleculars-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-geo-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-release
+    res_kind: package
+  - dep_kind: provides
+    name: sled-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-module-server-applications-release
+    res_kind: package
+  - dep_kind: provides
+    name: sle-ha-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: sle-we-release
+    res_kind: package
+  - dep_kind: provides
+    name: openSUSE-release
+    res_kind: package
+  - dep_kind: provides
+    name: sles-release
+    res_kind: package
+  - dep_kind: provides
+    name: SLED-SP1-migration
+    res_kind: package
+  - dep_kind: provides
+    name: leanos-SP1-migration
+    res_kind: package
+  - dep_kind: recommends
+    name: branding-SLE
+    res_kind: package
+  - dep_kind: recommends
+    name: branding-openSUSE
+    res_kind: package
+  - dep_kind: requires
+    name: glibc
+    res_kind: package
+  - dep_kind: requires
+    name: coreutils
+    res_kind: package
+  - dep_kind: requires
+    name: issue-generator
+    res_kind: package
+  - dep_kind: requires
+    name: bash
+    res_kind: package
+  deps:
+  - conflicts: leanos-release
+  - conflicts: sled-release
+  - conflicts: kernel < 4.4
+  - conflicts: perl-Bootloader < 0.904
+  - obsoletes: leanos-release
+  - prerequires: "/bin/sh"
+  - prerequires: coreutils
+  - prerequires: glibc >= 2.22
+  - provides: product-endoflife()
+  - provides: distribution-release
+  - provides: displayorder(200)
+  - provides: sles-release-15
+  - provides: product(SUSE_SLE) = 15
+  - provides: product(SUSE_SLE-SP0) = 15
+  - provides: product(SUSE_SLE) = 15-80.1
+  - provides: product(SUSE_SLE-SP0) = 15-80.1
+  - provides: product(SLES) = 15-0
+  - provides: product() = SLES
+  - provides: product-cpeid() = cpe%3A%2Fo%3Asuse%3Asles%3A15
+  - provides: product-label() = SLES15
+  - provides: config(sles-release) = 15-80.1
+  - provides: sles-release = 15-80.1
+  - provides: product-url(releasenotes) = 
https%3A%2F%2Fwww.suse.com%2Freleasenotes%2Fi586%2FSUSE%2DSLES%2F15%2Frelease%2Dnotes%2Dsles.rpm
+  - provides: sles-release(x86-32) = 15-80.1
+  - recommends: branding
+  - requires: issue-generator
+  - requires: "/bin/sh"
+  - requires: coreutils
+  - requires: glibc >= 2.22
+  description: |-
+    SUSE Linux Enterprise offers a comprehensive
+            suite of products built on a single code base.
+            The platform addresses business needs from
+            the smallest thin-client devices to the world's
+            most powerful high-performance computing
+            and mainframe servers. SUSE Linux Enterprise
+            offers common management tools and technology
+            certifications across the platform, and
+            each product is enterprise-class.
+  download_size: 23806
+  inst_size: 76341
+  location: sles-release-15-80.1.i586.rpm
+  locked: false
+  medium_nr: 0
+  name: sles-release
+  on_system_by_user: false
+  path: "./i586/sles-release-15-80.1.i586.rpm"
+  source: 0
+  status: :available
+  summary: SUSE Linux Enterprise Server 15 Alpha1
+  transact_by: :solver
+  vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
+  version: 15-80.1
+  version_epoch: 
+  version_release: '80.1'
+  version_version: '15'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/product_reader_test.rb 
new/yast2-installation-3.3.3/test/product_reader_test.rb
--- old/yast2-installation-3.2.46/test/product_reader_test.rb   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/product_reader_test.rb    2017-07-31 
15:08:34.827704126 +0200
@@ -0,0 +1,62 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 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 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.
+# 
------------------------------------------------------------------------------
+
+require "yaml"
+require_relative "./test_helper"
+
+require "installation/product_reader"
+
+describe Installation::ProductReader do
+  subject { Installation::ProductReader }
+
+  describe "#available_base_products" do
+    before do
+      # TODO: proper mocking of pkg methods
+      allow(subject).to 
receive(:installation_package_mapping).and_return("SLES" => "skelcd-SLES")
+    end
+
+    it "returns empty list if there is no product" do
+      expect(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, 
"")
+        .and_return([])
+      expect(subject.available_base_products).to eq([])
+    end
+
+    it "returns Installation::Product objects" do
+      products = YAML.load(load_fixture("products", "sles15.yml"))
+      expect(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, 
"")
+        .and_return(products)
+      expect(subject.available_base_products.first).to 
be_a(Installation::Product)
+    end
+
+    it "returns the correct product properties" do
+      products = YAML.load(load_fixture("products", "sles15.yml"))
+      expect(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, 
"")
+        .and_return(products)
+      ret = subject.available_base_products.first
+      expect(ret.name).to eq("SLES")
+      expect(ret.label).to eq("SUSE Linux Enterprise Server 15 Alpha1")
+    end
+
+    it "returns only the products from the initial repository" do
+      sp3 = YAML.load(load_fixture("products", "sles15.yml")).first
+      addon1 = sp3.dup
+      addon1["source"] = 1
+      addon2 = sp3.dup
+      addon2["source"] = 2
+
+      expect(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, 
"")
+        .and_return([addon2, addon1, sp3])
+
+      expect(subject.available_base_products.size).to eq(1)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/product_sorter_test.rb 
new/yast2-installation-3.3.3/test/product_sorter_test.rb
--- old/yast2-installation-3.2.46/test/product_sorter_test.rb   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/product_sorter_test.rb    2017-07-31 
15:08:34.827704126 +0200
@@ -0,0 +1,51 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 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 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.
+# 
------------------------------------------------------------------------------
+
+require_relative "./test_helper"
+
+require "installation/product"
+require "installation/product_sorter"
+
+describe "Installation::PRODUCT_SORTER" do
+
+  # testing products with defined ordering
+  let(:p1) { Installation::Product.new("p10", "Product with order 10", order: 
10) }
+  let(:p2) { Installation::Product.new("p20", "Product with order 20", order: 
20) }
+  let(:p3) { Installation::Product.new("p30", "Product with order 30", order: 
30) }
+  # testing products with undefined (nil) ordering
+  let(:pnil1) { Installation::Product.new("p1", "Product 1 without order") }
+  let(:pnil2) { Installation::Product.new("p2", "Product 2 without order") }
+
+  it "keeps an already sorted list unchanged" do
+    products = [p1, p2, p3]
+    products.sort!(&::Installation::PRODUCT_SORTER)
+    expect(products).to eq([p1, p2, p3])
+  end
+
+  it "sorts the products by the ordering number" do
+    products = [p3, p2, p1]
+    products.sort!(&::Installation::PRODUCT_SORTER)
+    expect(products).to eq([p1, p2, p3])
+  end
+
+  it "sorts by label if ordering is missing" do
+    products = [pnil2, pnil1]
+    products.sort!(&::Installation::PRODUCT_SORTER)
+    expect(products).to eq([pnil1, pnil2])
+  end
+
+  it "puts the products with undefined order at the end" do
+    products = [pnil2, p3, pnil1, p1]
+    products.sort!(&::Installation::PRODUCT_SORTER)
+    expect(products).to eq([p1, p3, pnil1, pnil2])
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.2.46/test/widgets/product_selector_test.rb 
new/yast2-installation-3.3.3/test/widgets/product_selector_test.rb
--- old/yast2-installation-3.2.46/test/widgets/product_selector_test.rb 
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.3.3/test/widgets/product_selector_test.rb  
2017-07-31 15:08:34.987704126 +0200
@@ -0,0 +1,39 @@
+require_relative "../test_helper"
+
+require "cwm/rspec"
+
+require "installation/product"
+require "installation/widgets/product_selector"
+
+describe ::Installation::Widgets::ProductSelector do
+  let(:product1) { Installation::Product.new("test1", "Test 1") }
+  let(:product2) { Installation::Product.new("test2", "Test 2") }
+  subject { described_class.new([product1, product2]) }
+
+  include_examples "CWM::RadioButtons"
+
+  describe "#store" do
+    before do
+      allow(Yast::Pkg).to receive(:PkgApplReset)
+      allow(Yast::Pkg).to receive(:PkgReset)
+    end
+
+    it "resets previous package configuration" do
+      # mock selecting the first product
+      allow(subject).to receive(:value).and_return("test1")
+      allow(product1).to receive(:select)
+      expect(Yast::Pkg).to receive(:PkgApplReset)
+      expect(Yast::Pkg).to receive(:PkgReset)
+      subject.store
+    end
+
+    it "selects the product to install" do
+      # mock selecting the first product
+      allow(subject).to receive(:value).and_return("test1")
+
+      expect(product1).to receive(:select)
+      expect(product2).to_not receive(:select)
+      subject.store
+    end
+  end
+end


Reply via email to