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 - jreidinger@suse.com
+
+- New client for product selection (FATE#323450)
+- 3.3.3
+
+-------------------------------------------------------------------
+Wed Jul 26 14:42:15 UTC 2017 - jreidinger@suse.com
+
+- drop reading /content (FATE#322386)
+- 3.3.2
+
+-------------------------------------------------------------------
+Thu Jun 29 11:51:55 UTC 2017 - jreidinger@suse.com
+
+- openSUSE only: reword title of desktop selection dialog
+ (boo#1045180)
+- 3.3.1
+
+-------------------------------------------------------------------
+Thu Jun 29 08:40:43 UTC 2017 - jreidinger@suse.com
+
+- 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 - jreidinger@suse.com
+
+- New client for product selection (FATE#323450)
+- 3.3.3
+
+-------------------------------------------------------------------
+Wed Jul 26 14:42:15 UTC 2017 - jreidinger@suse.com
+
+- drop reading /content (FATE#322386)
+- 3.3.2
+
+-------------------------------------------------------------------
+Thu Jun 29 11:51:55 UTC 2017 - jreidinger@suse.com
+
+- openSUSE only: reword title of desktop selection dialog
+ (boo#1045180)
+- 3.3.1
+
+-------------------------------------------------------------------
+Thu Jun 29 08:40:43 UTC 2017 - jreidinger@suse.com
+
+- 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 - shundhammer@suse.de
- 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 [ArrayInstallation::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() =