Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2020-11-13 18:57:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Fri Nov 13 18:57:16 2020 rev:498 rq:848079 version:4.3.41

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2020-10-23 
12:20:55.440622858 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new.24930/yast2.changes   2020-11-13 
18:57:24.582001914 +0100
@@ -1,0 +2,21 @@
+Wed Nov 11 22:25:45 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- add methods to decide if hibernation should be proposed
+  (jsc#SLE-12280)
+- 4.3.41
+
+-------------------------------------------------------------------
+Fri Nov  6 22:40:12 UTC 2020 - José Iván López González <jlo...@suse.com>
+
+- Ensure #current_items always returns a list.
+- Related to bsc#1177137.
+- 4.3.40
+
+-------------------------------------------------------------------
+Thu Nov  5 09:08:49 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- CWM ComboBox: query the current items offered by the widget when
+  the list of items is extended by a new value (bsc#1177137)
+- 4.3.39
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.3.38.tar.bz2

New:
----
  yast2-4.3.41.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.0TkiY0/_old  2020-11-13 18:57:25.566003054 +0100
+++ /var/tmp/diff_new_pack.0TkiY0/_new  2020-11-13 18:57:25.570003059 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.3.38
+Version:        4.3.41
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

++++++ yast2-4.3.38.tar.bz2 -> yast2-4.3.41.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.3.38/library/control/src/modules/ProductFeatures.rb 
new/yast2-4.3.41/library/control/src/modules/ProductFeatures.rb
--- old/yast2-4.3.38/library/control/src/modules/ProductFeatures.rb     
2020-10-20 15:26:38.000000000 +0200
+++ new/yast2-4.3.41/library/control/src/modules/ProductFeatures.rb     
2020-11-12 10:36:52.000000000 +0100
@@ -72,7 +72,8 @@
           "base_product_license_directory"  => 
"/usr/share/licenses/product/base/",
           "full_system_media_name"          => "",
           "full_system_download_url"        => "",
-          "save_y2logs"                     => true
+          "save_y2logs"                     => true,
+          "propose_hibernate"               => true
         },
         "partitioning"             => {
           "use_flexible_partitioning"    => false,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.3.38/library/cwm/src/lib/cwm/common_widgets.rb 
new/yast2-4.3.41/library/cwm/src/lib/cwm/common_widgets.rb
--- old/yast2-4.3.38/library/cwm/src/lib/cwm/common_widgets.rb  2020-10-20 
15:26:38.000000000 +0200
+++ new/yast2-4.3.41/library/cwm/src/lib/cwm/common_widgets.rb  2020-11-12 
10:36:52.000000000 +0100
@@ -57,6 +57,13 @@
       []
     end
 
+    # List the current items offered in the widget
+    #
+    # @return [Array<Array(String,String)>]
+    def current_items
+      Yast::UI.QueryWidget(Id(widget_id), :Items) || []
+    end
+
     # @return [WidgetHash]
     def cwm_definition
       super.merge(
@@ -194,7 +201,8 @@
     #
     # @param val [Object] Value to assign to the widget
     def value=(val)
-      change_items([[val, val]] + items) if editable? && 
!items.map(&:first).include?(val)
+      change_items([[val, val]] + current_items) if editable? && 
!current_items.map(&:first).include?(val)
+
       self.orig_value = val
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.38/library/cwm/test/common_widgets_test.rb 
new/yast2-4.3.41/library/cwm/test/common_widgets_test.rb
--- old/yast2-4.3.38/library/cwm/test/common_widgets_test.rb    2020-10-20 
15:26:38.000000000 +0200
+++ new/yast2-4.3.41/library/cwm/test/common_widgets_test.rb    2020-11-12 
10:36:52.000000000 +0100
@@ -140,16 +140,29 @@
     describe "when the widget is editable" do
       subject { MountPointSelector.new }
 
-      it "adds the given value to the list of items" do
-        expect(subject).to receive(:change_items).with([["/srv", "/srv"], 
["/", "/ (root)"]])
-        subject.value = "/srv"
+      context "and there is no current items" do
+        it "adds the given value" do
+          expect(subject).to receive(:change_items).with([["/srv", "/srv"]])
+          subject.value = "/srv"
+        end
+      end
+
+      context "and there are current items" do
+        before do
+          allow(subject).to receive(:current_items).and_return(subject.items)
+        end
+
+        it "adds the given value to the current list of items" do
+          expect(subject).to receive(:change_items).with([["/srv", "/srv"], 
["/", "/ (root)"]])
+          subject.value = "/srv"
+        end
       end
     end
 
     describe "when the widget is not editable" do
       subject { SelectorWithoutOpt.new }
 
-      it "does not add the given value to the list of items" do
+      it "does not add the given value to the current list of items" do
         expect(subject).to_not receive(:change_items)
         subject.value = "/srv"
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.38/library/system/src/modules/Kernel.rb 
new/yast2-4.3.41/library/system/src/modules/Kernel.rb
--- old/yast2-4.3.38/library/system/src/modules/Kernel.rb       2020-10-20 
15:26:38.000000000 +0200
+++ new/yast2-4.3.41/library/system/src/modules/Kernel.rb       2020-11-12 
10:36:52.000000000 +0100
@@ -57,6 +57,7 @@
       Yast.import "Popup"
       Yast.import "Stage"
       Yast.import "FileUtils"
+      Yast.import "ProductFeatures"
 
       textdomain "base"
 
@@ -552,6 +553,19 @@
       @inform_about_kernel_change
     end
 
+    # gets if YaST should propose hibernation aka Kernel resume parameter
+    # @return [Boolean] true if hibernation should be proposed
+    def propose_hibernation?
+      # Do not support s390. (jsc#SLE-6926)
+      return false unless Arch.i386 || Arch.x86_64
+      # Do not propose resume on virtuals (jsc#SLE-12280)
+      return false if Arch.is_kvm || Arch.is_xenU
+      # For some products it does not make sense to have hibernations 
(jsc#SLE-12280)
+      return false unless ProductFeatures.GetBooleanFeature("globals", 
"propose_hibernation")
+
+      true
+    end
+
     publish function: :AddCmdLine, type: "void (string, string)"
     publish function: :GetVgaType, type: "string ()"
     publish function: :GetCmdLine, type: "string ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.38/library/system/test/kernel_test.rb 
new/yast2-4.3.41/library/system/test/kernel_test.rb
--- old/yast2-4.3.38/library/system/test/kernel_test.rb 2020-10-20 
15:26:38.000000000 +0200
+++ new/yast2-4.3.41/library/system/test/kernel_test.rb 2020-11-12 
10:36:52.000000000 +0100
@@ -229,4 +229,61 @@
       end
     end
   end
+
+  describe ".propose_hibernation?" do
+    context "on non-intel architectures" do
+      before do
+        allow(Yast::Arch).to receive(:architecture).and_return("s390_64")
+      end
+
+      it "returns false" do
+        expect(subject.propose_hibernation?).to eq false
+      end
+    end
+
+    context "on intel architecture" do
+      before do
+        allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
+      end
+
+      context "on virtual machine" do
+        before do
+          allow(Yast::Arch).to receive(:is_kvm).and_return(true)
+        end
+
+        it "returns false" do
+          expect(subject.propose_hibernation?).to eq false
+        end
+      end
+
+      context "on real hardware" do
+        before do
+          allow(Yast::Arch).to receive(:is_kvm).and_return(false)
+          allow(Yast::Arch).to receive(:is_xenU).and_return(false)
+        end
+
+        context "when product does not want hibernation proposal" do
+          before do
+            allow(Yast::ProductFeatures).to receive(:GetBooleanFeature)
+              .with("globals", "propose_hibernation").and_return(false)
+          end
+
+          it "returns false" do
+            expect(subject.propose_hibernation?).to eq false
+          end
+        end
+
+        context "when product wants hibernation proposal" do
+          before do
+            allow(Yast::ProductFeatures).to receive(:GetBooleanFeature)
+              .with("globals", "propose_hibernation").and_return(true)
+          end
+
+          it "returns true" do
+            expect(subject.propose_hibernation?).to eq true
+          end
+        end
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.38/package/yast2.changes 
new/yast2-4.3.41/package/yast2.changes
--- old/yast2-4.3.38/package/yast2.changes      2020-10-20 15:26:38.000000000 
+0200
+++ new/yast2-4.3.41/package/yast2.changes      2020-11-12 10:36:52.000000000 
+0100
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Wed Nov 11 22:25:45 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- add methods to decide if hibernation should be proposed
+  (jsc#SLE-12280)
+- 4.3.41
+
+-------------------------------------------------------------------
+Fri Nov  6 22:40:12 UTC 2020 - José Iván López González <jlo...@suse.com>
+
+- Ensure #current_items always returns a list.
+- Related to bsc#1177137.
+- 4.3.40
+
+-------------------------------------------------------------------
+Thu Nov  5 09:08:49 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- CWM ComboBox: query the current items offered by the widget when
+  the list of items is extended by a new value (bsc#1177137)
+- 4.3.39
+
+-------------------------------------------------------------------
 Tue Oct 20 13:11:41 UTC 2020 - Ancor Gonzalez Sosa <an...@suse.com>
 
 - Added support for nested items in CWM::Table (bsc#1176402)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.38/package/yast2.spec 
new/yast2-4.3.41/package/yast2.spec
--- old/yast2-4.3.38/package/yast2.spec 2020-10-20 15:26:38.000000000 +0200
+++ new/yast2-4.3.41/package/yast2.spec 2020-11-12 10:36:52.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.3.38
+Version:        4.3.41
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to