Hello community,

here is the log from the commit of package yast2-country for openSUSE:Factory 
checked in at 2017-09-21 12:34:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-country (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-country.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-country"

Thu Sep 21 12:34:10 2017 rev:184 rq:527567 version:4.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes      
2017-08-02 11:26:47.569844394 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-country.new/yast2-country.changes 
2017-09-21 12:34:24.163000732 +0200
@@ -1,0 +2,65 @@
+Wed Sep 20 15:22:55 CEST 2017 - [email protected]
+
+- Removed dependency on yast-storage (bsc#1058869):
+  Assume hardware clock running on UTC if no check for windows
+  partition possible because yast-storage is not available 
+- 4.0.2
+
+-------------------------------------------------------------------
+Mon Sep 18 12:06:47 UTC 2017 - [email protected]
+
+- Augment "Uzhgorod" (Europe/Uzhgorod) with "Ukraine ..." to
+  prevent an unknown country from being offered (bsc#1054917)
+- 4.0.1
+
+-------------------------------------------------------------------
+Thu Sep  7 11:25:21 UTC 2017 - [email protected]
+
+- improve language selection to support also CaaSP needs
+  (FATE#323837)
+- 4.0.0
+
+-------------------------------------------------------------------
+Wed Aug 30 10:24:33 UTC 2017 - [email protected]
+
+- Add a widget for language selection (fate#322276)
+- Move keyboard selection widget to lib/y2country/widgets
+  directory
+- 3.3.2
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- merge storage-ng branch to master (fate#318196)
+- note: all changes below with this date belong to the merge
+- 3.3.1
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- Merged master to storage-ng branch 
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- remove last remaining old storage reference
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- Version temporarily bumped to 3.3.x to prioritize the
+  storage-ng branch
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- readded check for Windows based on storage-ng
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- storage-ng: commented installation-related code relying on the
+  old yast2-storage
+- Version temporarily bumped to 3.2.x to prioritize this branch
+
+-------------------------------------------------------------------

Old:
----
  yast2-country-3.3.0.tar.bz2

New:
----
  yast2-country-4.0.2.tar.bz2

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

Other differences:
------------------
++++++ yast2-country.spec ++++++
--- /var/tmp/diff_new_pack.N4Nvft/_old  2017-09-21 12:34:25.890757595 +0200
+++ /var/tmp/diff_new_pack.N4Nvft/_new  2017-09-21 12:34:25.890757595 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-country
-Version:        3.3.0
+Version:        4.0.2
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -52,13 +52,12 @@
 Requires:       yast2-core >= 2.16.28
 # new API of ntp-client_proposal.ycp
 Conflicts:      yast2-ntp-client < 2.18.0
-# wrapper_storage.ycp
+
 Requires:       yast2-packager >= 2.23.3
 # VMware detection (.probe.is_vmware)
 Requires:       yast2-hardware-detection >= 3.1.6
 
 Requires:       yast2-country-data
-
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Summary:        YaST2 - Country Settings (Language, Keyboard, and Timezone)

++++++ yast2-country-3.3.0.tar.bz2 -> yast2-country-4.0.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/.travis.yml 
new/yast2-country-4.0.2/.travis.yml
--- old/yast2-country-3.3.0/.travis.yml 2017-07-28 09:47:23.933816176 +0200
+++ new/yast2-country-4.0.2/.travis.yml 2017-09-20 16:54:09.345372957 +0200
@@ -5,6 +5,9 @@
 
 before_install:
   - docker build -t yast-country-image .
+  # list the installed packages (just for easier debugging)
+  - docker run --rm -it yast-country-image rpm -qa | sort
+
 script:
   # the "yast-travis-ruby" script is included in the base yastdevel/ruby image
   # see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/keyboard/src/Makefile.am 
new/yast2-country-4.0.2/keyboard/src/Makefile.am
--- old/yast2-country-3.3.0/keyboard/src/Makefile.am    2017-07-28 
09:47:23.937816176 +0200
+++ new/yast2-country-4.0.2/keyboard/src/Makefile.am    2017-09-20 
16:54:09.345372957 +0200
@@ -30,11 +30,11 @@
 desktop_DATA = \
   desktop/keyboard.desktop
 
-ylibdir = @ylibdir@/y2country
-ylib_DATA = \
-  lib/y2country/widgets.rb
+ywidgetsdir = @ylibdir@/y2country/widgets
+ywidgets_DATA = \
+  lib/y2country/widgets/keyboard_selection.rb
 
 EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) \
-  $(schemafiles_DATA) $(ydata_DATA) $(desktop_DATA) $(ylib_DATA)
+  $(schemafiles_DATA) $(ydata_DATA) $(desktop_DATA) $(ywidgets_DATA)
 
 include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/keyboard/src/lib/y2country/widgets/keyboard_selection.rb
 
new/yast2-country-4.0.2/keyboard/src/lib/y2country/widgets/keyboard_selection.rb
--- 
old/yast2-country-3.3.0/keyboard/src/lib/y2country/widgets/keyboard_selection.rb
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-country-4.0.2/keyboard/src/lib/y2country/widgets/keyboard_selection.rb
    2017-09-20 16:54:09.349372957 +0200
@@ -0,0 +1,105 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may 
find
+# current contact information at www.novell.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "cwm/widget"
+
+Yast.import "Keyboard"
+Yast.import "Language"
+
+module Y2Country
+  module Widgets
+    # Common parts for {KeyboardSelection} and {KeyboardSelectionCombo}.
+    module KeyboardSelectionBase
+      # param default [String] ID for default keyboard layout if not selected
+      #   and no proposal for current language is found.
+      #   Allowed values are defined in /usr/share/YaST2/data/keyboard_raw.ycp
+      def initialize(default = "english-us")
+        textdomain "country"
+        @default = default
+      end
+
+      def label
+        # widget label
+        _("&Keyboard Layout")
+      end
+
+      # forces widget to report immediatelly after value changed.
+      def opt
+        [:notify]
+      end
+
+      def init
+        if Yast::Keyboard.user_decision
+          self.value = Yast::Keyboard.current_kbd
+        else
+          initial_value = 
Yast::Keyboard.GetKeyboardForLanguage(Yast::Language.language, @default)
+          self.value = initial_value
+          Yast::Keyboard.Set(value)
+        end
+      end
+
+      def handle
+        return if Yast::Keyboard.current_kbd == value
+        Yast::Keyboard.Set(value)
+        # mark that user approve selection
+        Yast::Keyboard.user_decision = true
+
+        nil
+      end
+
+      def store
+        handle
+      end
+
+      def items
+        # a bit tricky as method return incompatible data
+        Yast::Keyboard.GetKeyboardItems.map do |item|
+          id, name, _enabled = item.params
+          id = id.params.first
+          [id, name]
+        end
+      end
+
+      def help
+        # help text for keyboard selection widget
+        _(
+          "<p>\n" \
+            "Choose the <b>Keyboard layout</b> to be used during\n" \
+            "installation and on the installed system.\n" \
+            "</p>\n"
+        )
+      end
+    end
+
+    class KeyboardSelection < CWM::SelectionBox
+      include KeyboardSelectionBase
+    end
+
+    class KeyboardSelectionCombo < CWM::ComboBox
+      include KeyboardSelectionBase
+
+      def opt
+        [:notify, :hstretch]
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/keyboard/src/lib/y2country/widgets.rb 
new/yast2-country-4.0.2/keyboard/src/lib/y2country/widgets.rb
--- old/yast2-country-3.3.0/keyboard/src/lib/y2country/widgets.rb       
2017-07-28 09:47:23.937816176 +0200
+++ new/yast2-country-4.0.2/keyboard/src/lib/y2country/widgets.rb       
1970-01-01 01:00:00.000000000 +0100
@@ -1,101 +0,0 @@
-# encoding: utf-8
-
-# 
------------------------------------------------------------------------------
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
-#
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of version 2 of the GNU General Public License as published by the
-# Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, contact Novell, Inc.
-#
-# To contact Novell about this file by physical or electronic mail, you may 
find
-# current contact information at www.novell.com.
-# 
------------------------------------------------------------------------------
-
-require "yast"
-require "cwm/widget"
-
-Yast.import "Keyboard"
-
-module Y2Country
-  module Widgets
-    # Common parts for {KeyboardSelection} and {KeyboardSelectionCombo}.
-    module KeyboardSelectionBase
-      # param default [String] ID for default keyboard layout if not selected.
-      # Allowed values are defined in /usr/share/YaST2/data/keyboard_raw.ycp
-      def initialize(default)
-        textdomain "country"
-        @default = default
-      end
-
-      def label
-        # widget label
-        _("&Keyboard Layout")
-      end
-
-      # forces widget to report immediatelly after value changed.
-      def opt
-        [:notify]
-      end
-
-      def init
-        if Yast::Keyboard.user_decision
-          self.value = Yast::Keyboard.current_kbd
-        else
-          self.value = @default
-          Yast::Keyboard.Set(value)
-        end
-      end
-
-      def handle
-        Yast::Keyboard.Set(value)
-        # mark that user approve selection
-        Yast::Keyboard.user_decision = true
-
-        nil
-      end
-
-      def store
-        handle
-      end
-
-      def items
-        # a bit tricky as method return incompatible data
-        Yast::Keyboard.GetKeyboardItems.map do |item|
-          id, name, _enabled = item.params
-          id = id.params.first
-          [id, name]
-        end
-      end
-
-      def help
-        # help text for keyboard selection widget
-        _(
-          "<p>\n" \
-            "Choose the <b>Keyboard layout</b> to be used during\n" \
-            "installation and on the installed system.\n" \
-            "</p>\n"
-        )
-      end
-    end
-
-    class KeyboardSelection < CWM::SelectionBox
-      include KeyboardSelectionBase
-    end
-
-    class KeyboardSelectionCombo < CWM::ComboBox
-      include KeyboardSelectionBase
-
-      def opt
-        [:notify, :hstretch]
-      end
-    end
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/keyboard/test/Makefile.am 
new/yast2-country-4.0.2/keyboard/test/Makefile.am
--- old/yast2-country-3.3.0/keyboard/test/Makefile.am   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-country-4.0.2/keyboard/test/Makefile.am   2017-09-20 
16:54:09.349372957 +0200
@@ -0,0 +1,14 @@
+#
+# Makefile.am for keyboard/test
+#
+
+TESTS = \
+    keyboard_test.rb \
+               widgets/keyboard_selection_test.rb
+
+TEST_EXTENSIONS = .rb
+RB_LOG_COMPILER = rspec
+VERBOSE = 1
+EXTRA_DIST = $(TESTS)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/keyboard/test/widgets/keyboard_selection_test.rb 
new/yast2-country-4.0.2/keyboard/test/widgets/keyboard_selection_test.rb
--- old/yast2-country-3.3.0/keyboard/test/widgets/keyboard_selection_test.rb    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-country-4.0.2/keyboard/test/widgets/keyboard_selection_test.rb    
2017-09-20 16:54:09.349372957 +0200
@@ -0,0 +1,90 @@
+#!/usr/bin/env rspec
+
+require_relative "../test_helper"
+require "y2country/widgets/keyboard_selection"
+require "cwm/rspec"
+
+describe Y2Country::Widgets::KeyboardSelection do
+  subject { described_class.new("english-us") }
+
+  include_examples "CWM::AbstractWidget"
+
+  it "enlists all available keyboard layoout" do
+    expect(subject.items).to include(["english-us", "English (US)"])
+  end
+
+  it "passes notify option to widget" do
+    expect(subject.opt).to eq [:notify]
+  end
+
+  it "stores keyboard layout" do
+    expect(Yast::Keyboard).to receive(:Set)
+
+    subject.store
+  end
+
+  context "when keyboard layout already set" do
+    before do
+      allow(Yast::Keyboard).to receive(:user_decision).and_return(true)
+    end
+
+    it "initializes widget to previous selection" do
+      allow(Yast::Keyboard).to receive(:current_kbd).and_return("english-uk")
+
+      expect(subject).to receive(:value=).with("english-uk")
+
+      subject.init
+    end
+  end
+
+  context "when keyboard layout not yet set" do
+    before do
+      allow(Yast::Keyboard).to receive(:user_decision).and_return(false)
+    end
+
+    it "initializes widget to english us layout" do
+      expect(subject).to receive(:value=).with("english-us")
+
+      subject.init
+    end
+
+    it "initializes that default layout" do
+      expect(subject).to receive(:value).and_return("english-us")
+
+      expect(Yast::Keyboard).to receive(:Set).with("english-us")
+
+      subject.init
+    end
+  end
+
+  describe "#handle" do
+    before do
+      allow(Yast::Keyboard).to receive(:current_kbd).and_return(initial_kbd)
+      allow(subject).to receive(:value).and_return(selected_value)
+    end
+
+    context "when keyboard is not changed" do
+      let(:initial_kbd) { "english-us" }
+      let(:selected_value) { "english-us" }
+
+      it "does not try to set the keyboard again" do
+        expect(subject).to receive(:value).and_return("english-us")
+        expect(Yast::Keyboard).to_not receive(:Set)
+
+        subject.handle
+      end
+    end
+
+    context "when keyboard has changed" do
+      let(:initial_kbd) { "english-us" }
+      let(:selected_value) { "spanish" }
+
+      it "sets the new value" do
+        expect(Yast::Keyboard).to receive(:Set).with("spanish")
+        expect(Yast::Keyboard).to receive(:user_decision=).with(true)
+
+        subject.handle
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/keyboard/test/widgets_test.rb 
new/yast2-country-4.0.2/keyboard/test/widgets_test.rb
--- old/yast2-country-3.3.0/keyboard/test/widgets_test.rb       2017-07-28 
09:47:23.949816176 +0200
+++ new/yast2-country-4.0.2/keyboard/test/widgets_test.rb       1970-01-01 
01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-#!/usr/bin/env rspec
-
-require_relative 'test_helper'
-require "y2country/widgets"
-
-describe Y2Country::Widgets::KeyboardSelection do
-  subject { described_class.new("english-us") }
-  it "has label" do
-    expect(subject.label).to be_a(::String)
-  end
-
-  it "has help" do
-    expect(subject.help).to be_a(::String)
-  end
-
-  it "enlists all available keyboard layoout" do
-    expect(subject.items).to include(["english-us", "English (US)"])
-  end
-
-  it "changes keyboard layout when value changed" do
-    expect(Yast::Keyboard).to receive(:Set)
-
-    expect(subject.handle).to eql(nil)
-  end
-
-  it "passes notify option to widget" do
-    expect(subject.opt).to eq [:notify]
-  end
-
-  it "stores keyboard layout" do
-    expect(Yast::Keyboard).to receive(:Set)
-
-    subject.store
-  end
-
-  context "when keyboard layout already set" do
-    before do
-      allow(Yast::Keyboard).to receive(:user_decision).and_return(true)
-    end
-
-    it "initizalizes widget to previous selection" do
-      allow(Yast::Keyboard).to receive(:current_kbd).and_return("english-uk")
-
-      expect(subject).to receive(:value=).with("english-uk")
-
-      subject.init
-    end
-  end
-
-  context "when keyboard layout not yet set" do
-    before do
-      allow(Yast::Keyboard).to receive(:user_decision).and_return(false)
-    end
-
-    it "initizalizes widget to english us layout" do
-      expect(subject).to receive(:value=).with("english-us")
-
-      subject.init
-    end
-
-    it "initializes that default layout" do
-      expect(subject).to receive(:value).and_return("english-us")
-
-      expect(Yast::Keyboard).to receive(:Set).with("english-us")
-
-      subject.init
-    end
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/language/src/Makefile.am 
new/yast2-country-4.0.2/language/src/Makefile.am
--- old/yast2-country-3.3.0/language/src/Makefile.am    2017-07-28 
09:47:23.949816176 +0200
+++ new/yast2-country-4.0.2/language/src/Makefile.am    2017-09-20 
16:54:09.353372957 +0200
@@ -85,9 +85,17 @@
   data/languages/language_th_TH.ycp \
   data/languages/language_en_GB.ycp
 
+# ylibdir = @ylibdir@/y2country
+# ylib_DATA = \
+#   lib/y2country/widgets/language_selection.rb
+
+ywidgetsdir = @ylibdir@/y2country/widgets
+ywidgets_DATA = \
+       lib/y2country/widgets/language_selection.rb
+
 desktop_DATA = \
   desktop/yast-language.desktop
 
-EXTRA_DIST = $(module_DATA) $(module1_DATA) $(client_DATA) $(scrconf_DATA) 
$(schemafiles_DATA) $(ydata_DATA) $(desktop_DATA)
+EXTRA_DIST = $(module_DATA) $(module1_DATA) $(client_DATA) $(scrconf_DATA) 
$(schemafiles_DATA) $(ydata_DATA) $(desktop_DATA) $(ylib_DATA) $(ywidgets_DATA)
 
-include $(top_srcdir)/Makefile.am.common
\ No newline at end of file
+include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/language/src/lib/y2country/widgets/language_selection.rb
 
new/yast2-country-4.0.2/language/src/lib/y2country/widgets/language_selection.rb
--- 
old/yast2-country-3.3.0/language/src/lib/y2country/widgets/language_selection.rb
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-country-4.0.2/language/src/lib/y2country/widgets/language_selection.rb
    2017-09-20 16:54:09.357372957 +0200
@@ -0,0 +1,127 @@
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may 
find
+# current contact information at www.novell.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "cwm/widget"
+
+Yast.import "Console"
+Yast.import "Language"
+Yast.import "Timezone"
+Yast.import "UI"
+Yast.import "Mode"
+
+module Y2Country
+  module Widgets
+    # Language selection widget
+    class LanguageSelection < CWM::ComboBox
+
+      attr_reader :default
+
+      # @param emit_event [Boolean] flag if handle of widget emit `:redraw` 
event
+      #   when language changed or not
+      def initialize(emit_event: false)
+        textdomain "country"
+        @default = Yast::Language.language
+        @emit_event = emit_event
+      end
+
+      # Widget label
+      #
+      # @return [String]
+      def label
+        _("&Language")
+      end
+
+      # Widget options
+      #
+      # Widget is forced to report immediatelly after value changed.
+      def opt
+        [:notify, :hstretch]
+      end
+
+      # Initialize the selected value
+      def init
+        self.value = default
+      end
+
+      # Widget help text
+      #
+      # @return [String]
+      def help
+        _(
+          "<p>\n" \
+            "Choose the <b>Language</b> to be used during\n" \
+            "installation and on the installed system.\n" \
+          "</p>\n"
+        )
+      end
+
+      # Handle value changes
+      def handle
+        return if value.nil? || value == default
+        Yast::Timezone.ResetZonemap
+        Yast::Language.Set(value)
+        Yast::Language.languages = Yast::Language.RemoveSuffix(value)
+        @default = value
+        return nil if !@emit_event || Yast::Mode.config
+
+        switch_language
+        :redraw
+      end
+
+      # Store widget value
+      def store
+        handle
+
+        switch_language if !@emit_event && !Yast::Mode.config
+
+        nil
+      end
+
+      # Return the options to be shown in the combobox
+      #
+      # @return [Array<Array<String,String>>] Array of languages in form 
[code, description]
+      def items
+        @items ||= Yast::Language.GetLanguageItems(:first_screen).map do |item|
+          id, description = item.to_a
+          code = id.first
+          [code, description]
+        end
+      end
+
+    private
+
+      def switch_language
+        if Yast::Language.SwitchToEnglishIfNeeded(true)
+          log.debug "UI switched to en_US"
+        else
+          Yast::Console.SelectFont(Yast::Language.language)
+          # no yast translation for nn_NO, use nb_NO as a backup
+          # FIXME: remove the hack, please
+          if Yast::Language.language == "nn_NO"
+            log.info "Nynorsk not translated, using Bokm\u00E5l"
+            Yast::Language.WfmSetGivenLanguage("nb_NO")
+          else
+            Yast::Language.WfmSetLanguage
+          end
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/language/test/Makefile.am 
new/yast2-country-4.0.2/language/test/Makefile.am
--- old/yast2-country-3.3.0/language/test/Makefile.am   2017-07-28 
09:47:23.953816176 +0200
+++ new/yast2-country-4.0.2/language/test/Makefile.am   2017-09-20 
16:54:09.357372957 +0200
@@ -1,12 +1,13 @@
 #
-# Makefile.am for autoinstallation/test
+# Makefile.am for language/test
 #
 
 TESTS = \
-    Language_test.rb
+    Language_test.rb \
+    widgets/language_selection_test.rb
 
 TEST_EXTENSIONS = .rb
-RB_LOG_COMPILER = rspec
+RB_LOG_COMPILER = rspec --format doc
 VERBOSE = 1
 EXTRA_DIST = $(TESTS)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/language/test/test_helper.rb 
new/yast2-country-4.0.2/language/test/test_helper.rb
--- old/yast2-country-3.3.0/language/test/test_helper.rb        2017-07-28 
09:47:23.953816176 +0200
+++ new/yast2-country-4.0.2/language/test/test_helper.rb        2017-09-20 
16:54:09.357372957 +0200
@@ -1,5 +1 @@
-root_location = File.expand_path("../../", __FILE__)
-ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
-
-require "yast"
-require "yast/rspec"
+require_relative "../../test/test_helper"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/language/test/widgets/language_selection_test.rb 
new/yast2-country-4.0.2/language/test/widgets/language_selection_test.rb
--- old/yast2-country-3.3.0/language/test/widgets/language_selection_test.rb    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-country-4.0.2/language/test/widgets/language_selection_test.rb    
2017-09-20 16:54:09.357372957 +0200
@@ -0,0 +1,133 @@
+#!/usr/bin/env rspec --format doc
+
+require_relative "../test_helper"
+require "cwm/rspec"
+require "y2country/widgets/language_selection"
+
+describe Y2Country::Widgets::LanguageSelection do
+  include_examples "CWM::ComboBox"
+
+  subject(:widget) { described_class.new }
+  let(:default_language) { "en_US" }
+
+  LANGUAGES = [["af_ZA", "Afrikaans - Afrikaans"], ["en_US", "English 
(US)"]].freeze
+  LANGUAGE_ITEMS = LANGUAGES.map do |lang|
+    code, description = lang
+    Yast::Term.new(:item, Yast::Term.new(:id, code), description)
+  end.freeze
+
+  before do
+    allow(Yast::Language).to receive(:GetLanguageItems)
+    allow(Yast::Language).to receive(:GetLanguageItems)
+      .with(:first_screen).and_return(LANGUAGE_ITEMS)
+  end
+
+  shared_examples "switch language" do |method|
+    before do
+      allow(Yast::Language).to 
receive(:SwitchToEnglishIfNeeded).and_return(false)
+      allow(Yast::Console).to receive(:SelectFont)
+      allow(Yast::Language).to receive(:language).and_return("cs_CZ")
+      # value have to be different otherwise it is skipped
+      allow(Yast::Language).to receive(:WfmSetLanguage)
+      allow(Yast::Language).to receive(:WfmSetGivenLanguage)
+    end
+
+    context "language needed to be switched to English" do
+      before do
+        allow(Yast::Language).to 
receive(:SwitchToEnglishIfNeeded).and_return(true)
+      end
+
+      it "switch language to english" do
+        expect(Yast::Language).to 
receive(:SwitchToEnglishIfNeeded).and_return(true)
+
+        subject.public_send(method)
+      end
+    end
+
+    context "language does not need to be switched to English" do
+      it "sets console font according to language" do
+        expect(Yast::Console).to receive(:SelectFont).with("cs_CZ")
+
+        subject.public_send(method)
+      end
+
+      it "sets WFM language according to selected language" do
+        expect(Yast::Language).to receive(:WfmSetLanguage)
+
+        subject.public_send(method)
+      end
+
+      context "selected langauge is nn_NO" do
+        before do
+          allow(Yast::Language).to receive(:language).and_return("nn_NO")
+        end
+
+        it "it sets WFM language to nb_NO instead" do
+          expect(Yast::Language).to receive(:WfmSetGivenLanguage).with("nb_NO")
+
+          subject.public_send(method)
+        end
+      end
+    end
+  end
+
+  it "enlists all available languages" do
+    expect(widget.items).to eq(LANGUAGES)
+  end
+
+  describe "#handle" do
+    let(:value) { "en_UK" }
+
+    before do
+      allow(Yast::Language).to receive(:language).and_return(default_language)
+      allow(widget).to receive(:value).and_return(value)
+      allow(Yast::Language).to receive(:Set)
+      allow(Yast::Language).to receive(:languages=)
+      allow(Yast::Timezone).to receive(:ResetZonemap)
+    end
+
+    context "when language remains unchanged" do
+      let(:value) { default_language }
+
+      it "returns nil" do
+        expect(widget.handle).to eq(nil)
+      end
+    end
+
+    context "when language has been changed" do
+      it "sets the new language" do
+        expect(Yast::Language).to receive(:Set).with(value)
+        expect(Yast::Language).to receive(:languages=).with(value)
+        widget.handle
+      end
+
+      it "resets the timezones map" do
+        expect(Yast::Timezone).to receive(:ResetZonemap)
+        widget.handle
+      end
+    end
+
+    context "when emit_event is set to true and Yast::Mode is not config" do
+      subject(:widget) { described_class.new(emit_event: true) }
+
+      include_examples "switch language", :handle
+
+      it "returns :redraw" do
+        expect(subject.handle).to eq :redraw
+      end
+    end
+  end
+
+  describe "#store" do
+    it "calls #handle method" do
+      expect(widget).to receive(:handle)
+      widget.store
+    end
+
+    context "when emit_event is set to false and Yast::Mode is not config" do
+      subject(:widget) { described_class.new(emit_event: false) }
+
+      include_examples "switch language", :store
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/package/yast2-country.changes 
new/yast2-country-4.0.2/package/yast2-country.changes
--- old/yast2-country-3.3.0/package/yast2-country.changes       2017-07-28 
09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/package/yast2-country.changes       2017-09-20 
16:54:09.361372957 +0200
@@ -1,4 +1,69 @@
 -------------------------------------------------------------------
+Wed Sep 20 15:22:55 CEST 2017 - [email protected]
+
+- Removed dependency on yast-storage (bsc#1058869):
+  Assume hardware clock running on UTC if no check for windows
+  partition possible because yast-storage is not available 
+- 4.0.2
+
+-------------------------------------------------------------------
+Mon Sep 18 12:06:47 UTC 2017 - [email protected]
+
+- Augment "Uzhgorod" (Europe/Uzhgorod) with "Ukraine ..." to
+  prevent an unknown country from being offered (bsc#1054917)
+- 4.0.1
+
+-------------------------------------------------------------------
+Thu Sep  7 11:25:21 UTC 2017 - [email protected]
+
+- improve language selection to support also CaaSP needs
+  (FATE#323837)
+- 4.0.0
+
+-------------------------------------------------------------------
+Wed Aug 30 10:24:33 UTC 2017 - [email protected]
+
+- Add a widget for language selection (fate#322276)
+- Move keyboard selection widget to lib/y2country/widgets
+  directory
+- 3.3.2
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- merge storage-ng branch to master (fate#318196)
+- note: all changes below with this date belong to the merge
+- 3.3.1
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- Merged master to storage-ng branch 
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- remove last remaining old storage reference
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- Version temporarily bumped to 3.3.x to prioritize the
+  storage-ng branch
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- readded check for Windows based on storage-ng
+
+-------------------------------------------------------------------
+Mon Aug 14 09:44:58 UTC 2017 - [email protected]
+
+- storage-ng: commented installation-related code relying on the
+  old yast2-storage
+- Version temporarily bumped to 3.2.x to prioritize this branch
+
+-------------------------------------------------------------------
 Thu Jul 27 11:19:13 UTC 2017 - [email protected]
 
 - No longer read /content file from media, instead language from
@@ -9,7 +74,7 @@
 -------------------------------------------------------------------
 Mon Jun 19 14:45:17 UTC 2017 - [email protected]
 
-- Alterations in vconsole.conf performed by localectl and not 
+- Alterations in vconsole.conf performed by localectl and not
   directly by YaST (bsc#1023774).
 - 3.2.12
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/package/yast2-country.spec 
new/yast2-country-4.0.2/package/yast2-country.spec
--- old/yast2-country-3.3.0/package/yast2-country.spec  2017-07-28 
09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/package/yast2-country.spec  2017-09-20 
16:54:09.361372957 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-country
-Version:        3.3.0
+Version:        4.0.2
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -52,13 +52,12 @@
 Requires:       yast2-core >= 2.16.28
 # new API of ntp-client_proposal.ycp
 Conflicts:      yast2-ntp-client < 2.18.0
-# wrapper_storage.ycp
+
 Requires:       yast2-packager >= 2.23.3
 # VMware detection (.probe.is_vmware)
 Requires:       yast2-hardware-detection >= 3.1.6
 
 Requires:       yast2-country-data
-
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Summary:        YaST2 - Country Settings (Language, Keyboard, and Timezone)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/test/test_helper.rb 
new/yast2-country-4.0.2/test/test_helper.rb
--- old/yast2-country-3.3.0/test/test_helper.rb 2017-07-28 09:47:23.957816176 
+0200
+++ new/yast2-country-4.0.2/test/test_helper.rb 2017-09-20 16:54:09.361372957 
+0200
@@ -14,7 +14,7 @@
   end
 
   # for correct coverage report we need to load all ruby files
-  Dir["#{root_location}/*/src/{module,include,lib}/**/*.rb"].each { |f| 
require_relative f }
+  SimpleCov.track_files("#{root_location}/**/src/**/*.rb")
 
   # use coveralls for on-line code coverage reporting at Travis CI
   if ENV["TRAVIS"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/timezone/src/clients/inst_timezone.rb 
new/yast2-country-4.0.2/timezone/src/clients/inst_timezone.rb
--- old/yast2-country-3.3.0/timezone/src/clients/inst_timezone.rb       
2017-07-28 09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/timezone/src/clients/inst_timezone.rb       
2017-09-20 16:54:09.361372957 +0200
@@ -20,7 +20,7 @@
 # 
------------------------------------------------------------------------------
 # Client for initial timezone setting (part of installation sequence)
 # Author:      Jiri Suchomel <[email protected]>
-# $Id$
+
 module Yast
   class InstTimezoneClient < Client
     include Yast::Logger
@@ -29,8 +29,8 @@
       Yast.import "UI"
       Yast.import "GetInstArgs"
       Yast.import "Stage"
-      Yast.import "Storage"
       Yast.import "Wizard"
+      Yast.import "Timezone"
 
       Yast.include self, "timezone/dialogs.rb"
 
@@ -43,11 +43,7 @@
         return :auto
       end
 
-      if Stage.initial &&
-          Ops.greater_than(
-            Builtins.size(Storage.GetWinPrimPartitions(Storage.GetTargetMap)),
-            0
-          )
+      if Stage.initial && Timezone.system_has_windows?
         Timezone.windows_partition = true
         Builtins.y2milestone("windows partition found: assuming local time")
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/timezone/src/clients/timezone.rb 
new/yast2-country-4.0.2/timezone/src/clients/timezone.rb
--- old/yast2-country-3.3.0/timezone/src/clients/timezone.rb    2017-07-28 
09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/timezone/src/clients/timezone.rb    2017-09-20 
16:54:09.361372957 +0200
@@ -137,22 +137,9 @@
       # create the wizard dialog
       Wizard.OpenOKDialog
 
-      # wrapper for storage calls, returns nil of yast2-storage is not 
installed
-      targets = Convert.convert(
-        WFM.call("wrapper_storage", ["GetTargetMap"]),
-        :from => "any",
-        :to   => "map <string, map>"
-      )
-      if targets != nil
-        partitions = Convert.convert(
-          WFM.call("wrapper_storage", ["GetWinPrimPartitions", [targets]]),
-          :from => "any",
-          :to   => "list <map>"
-        )
-        if partitions != nil && Ops.greater_than(Builtins.size(partitions), 0)
-          Timezone.windows_partition = true
-          Builtins.y2milestone("windows partition found")
-        end
+      if Timezone.system_has_windows?
+        Timezone.windows_partition = true
+        Builtins.y2milestone("windows partition found")
       end
 
       result = TimezoneDialog({})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/timezone/src/clients/timezone_proposal.rb 
new/yast2-country-4.0.2/timezone/src/clients/timezone_proposal.rb
--- old/yast2-country-3.3.0/timezone/src/clients/timezone_proposal.rb   
2017-07-28 09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/timezone/src/clients/timezone_proposal.rb   
2017-09-20 16:54:09.365372957 +0200
@@ -7,6 +7,7 @@
 # Purpose:             Proposal function dispatcher - timezone.
 #
 #                      See also file proposal-API.txt for details.
+
 module Yast
   class TimezoneProposalClient < Client
     def main
@@ -44,14 +45,7 @@
           )
           Ops.set(@ret, "warning_level", :blocker)
         else
-          Yast.import "Storage"
-          if !Timezone.windows_partition &&
-              Ops.greater_than(
-                Builtins.size(
-                  Storage.GetWinPrimPartitions(Storage.GetTargetMap)
-                ),
-                0
-              )
+          if !Timezone.windows_partition && Timezone.system_has_windows?
             Timezone.windows_partition = true
             Builtins.y2milestone("windows partition found: assuming local 
time")
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-3.3.0/timezone/src/data/timezone_raw.ycp 
new/yast2-country-4.0.2/timezone/src/data/timezone_raw.ycp
--- old/yast2-country-3.3.0/timezone/src/data/timezone_raw.ycp  2017-07-28 
09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/timezone/src/data/timezone_raw.ycp  2017-09-20 
16:54:09.365372957 +0200
@@ -80,7 +80,7 @@
        "Europe/Stockholm" : _("Sweden"),
        "Europe/Tallinn" : _("Estonia"),
        "Europe/Tirane" : _("Albania"),
-       "Europe/Uzhgorod"       : _("Uzhgorod"),
+       "Europe/Uzhgorod"       : _("Ukraine (Uzhgorod)"),
        "Europe/Vaduz" : _("Liechtenstein"),
        "Europe/Vatican" : _("Vatican"),
        "Europe/Vienna" : _("Austria"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-3.3.0/timezone/src/modules/Timezone.rb 
new/yast2-country-4.0.2/timezone/src/modules/Timezone.rb
--- old/yast2-country-3.3.0/timezone/src/modules/Timezone.rb    2017-07-28 
09:47:23.957816176 +0200
+++ new/yast2-country-4.0.2/timezone/src/modules/Timezone.rb    2017-09-20 
16:54:09.365372957 +0200
@@ -23,10 +23,15 @@
 # Summary:     Timezone related stuff
 # Authors:     Klaus Kaempf <[email protected]>
 #              Thomas Roelz <[email protected]>
-#
-# $Id$
+
 require "yast"
 
+begin
+  require "y2storage"
+rescue LoadError
+  # Ignore y2storage not being available (bsc#1058869)
+end
+
 module Yast
   class TimezoneClass < Module
     include Yast::Logger
@@ -1000,6 +1005,20 @@
       HTML.List(ret)
     end
 
+    # Checks whether the system has Windows installed
+    def system_has_windows?
+      begin
+        win_partitions = disk_analyzer.windows_partitions
+        !win_partitions.empty?
+      rescue NameError => ex
+        # bsc#1058869: Don't enforce y2storage being available
+        log.warn("Caught #{ex}")
+        log.warn("No storage-ng support - not checking for a windows 
partition")
+        log.warn("Assuming UTC for the hardware clock")
+        false # No windows partition found
+      end
+    end
+
     # Determines whether timezone is read-only for the current product
     #
     # @return [Boolean] true if it's read-only; false otherwise.
@@ -1065,6 +1084,12 @@
     publish :function => :Import, :type => "boolean (map)"
     publish :function => :Export, :type => "map ()"
     publish :function => :Summary, :type => "string ()"
+
+  protected
+
+    def disk_analyzer
+      Y2Storage::StorageManager.instance.probed_disk_analyzer
+    end
   end
 
   Timezone = TimezoneClass.new


Reply via email to