Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-s390 for openSUSE:Factory 
checked in at 2022-02-10 23:12:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-s390 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-s390.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-s390"

Thu Feb 10 23:12:24 2022 rev:24 rq:953239 version:4.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-s390/yast2-s390.changes    2022-02-03 
23:17:51.928047991 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-s390.new.1956/yast2-s390.changes  
2022-02-10 23:13:11.908378864 +0100
@@ -1,0 +2,6 @@
+Thu Feb 10 10:18:47 UTC 2022 - Knut Anderssen <kanders...@suse.com>
+
+- Fix DasdSummary requirement (bsc#1195753)
+- 4.4.4
+
+-------------------------------------------------------------------

Old:
----
  yast2-s390-4.4.3.tar.bz2

New:
----
  yast2-s390-4.4.4.tar.bz2

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

Other differences:
------------------
++++++ yast2-s390.spec ++++++
--- /var/tmp/diff_new_pack.fCou8y/_old  2022-02-10 23:13:12.368380029 +0100
+++ /var/tmp/diff_new_pack.fCou8y/_new  2022-02-10 23:13:12.372380039 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.4.3
+Version:        4.4.4
 Release:        0
 Summary:        YaST2 - S/390 Specific Features Configuration
 License:        GPL-2.0-only

++++++ yast2-s390-4.4.3.tar.bz2 -> yast2-s390-4.4.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/package/yast2-s390.changes 
new/yast2-s390-4.4.4/package/yast2-s390.changes
--- old/yast2-s390-4.4.3/package/yast2-s390.changes     2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/package/yast2-s390.changes     2022-02-10 
15:54:10.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Feb 10 10:18:47 UTC 2022 - Knut Anderssen <kanders...@suse.com>
+
+- Fix DasdSummary requirement (bsc#1195753)
+- 4.4.4
+
+-------------------------------------------------------------------
 Tue Feb  1 19:15:35 UTC 2022 - Knut Anderssen <kanders...@suse.com>
 
 - Related to jsc#SLE-20225
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/package/yast2-s390.spec 
new/yast2-s390-4.4.4/package/yast2-s390.spec
--- old/yast2-s390-4.4.3/package/yast2-s390.spec        2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/package/yast2-s390.spec        2022-02-10 
15:54:10.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.4.3
+Version:        4.4.4
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/src/include/s390/dasd/dialogs.rb 
new/yast2-s390-4.4.4/src/include/s390/dasd/dialogs.rb
--- old/yast2-s390-4.4.3/src/include/s390/dasd/dialogs.rb       2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/src/include/s390/dasd/dialogs.rb       2022-02-10 
15:54:10.000000000 +0100
@@ -78,9 +78,9 @@
     def item_elements_for(dasd)
       item_id = Id(dasd.id)
       diag = String.YesNo(Mode.config ? dasd.diag_wanted : dasd.use_diag)
-      formatted = String.YesNo(dasd.formatted?)
+      formatted = String.YesNo(Mode.config ? dasd.format_wanted : 
dasd.formatted?)
 
-      return [item_id, dasd.id, d.format, diag] if Mode.config
+      return [item_id, dasd.id, formatted, diag] if Mode.config
       return [item_id, dasd.id, "--", "--", "--", diag, "--", "--"] unless 
dasd.active?
 
       [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-s390-4.4.3/src/lib/y2s390/presenters/dasd_summary.rb 
new/yast2-s390-4.4.4/src/lib/y2s390/presenters/dasd_summary.rb
--- old/yast2-s390-4.4.3/src/lib/y2s390/presenters/dasd_summary.rb      
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-s390-4.4.4/src/lib/y2s390/presenters/dasd_summary.rb      
2022-02-10 15:54:10.000000000 +0100
@@ -0,0 +1,76 @@
+# Copyright (c) [2022] 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.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+
+Yast.import "Mode"
+Yast.import "String"
+
+module Y2S390
+  module Presenters
+    # This class is responsible of returning a configuration summary of the 
given devices
+    class DasdSummary
+      include Yast::Logger
+      include Yast::I18n
+
+      # @return [Y2S390::DasdsCollection]
+      attr_accessor :devices
+
+      # Constructor
+      #
+      # @param devices [Y2S390::DasdsCollection]
+      def initialize(devices)
+        textdomain "s390"
+        @devices = devices
+      end
+
+      # Return a list with the configuration summary for all the devices given 
in text plain
+      #
+      # @return [Array<String>]
+      def list
+        ret = devices.map { |d| format(template, *params(d)) }
+        log.info("Summary: #{ret}")
+        ret
+      end
+
+    private
+
+      # Convenience method to obtain the arguments needed by the configuration 
template to be used
+      # depending on the {Yast::Mode}
+      #
+      # @param device [Y2S390::Dasd]
+      def params(device)
+        format = Yast::String.YesNo(device.format_wanted)
+        use_diag = Yast::String.YesNo(Yast::Mode.config ? device.diag_wanted : 
device.use_diag)
+        return [device.id, format, use_diag] if Yast::Mode.config
+
+        [device.id, device.device_name, use_diag]
+      end
+
+      # Return the configuration summary template to be used depending on the 
{Yast::Mode}
+      #
+      # @return [String]
+      def template
+        return _("Channel ID: %s, Format: %s, DIAG: %s") if Yast::Mode.config
+
+        _("Channel ID: %s, Device: %s, DIAG: %s")
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-s390-4.4.3/src/lib/y2s390/presenters/summary.rb 
new/yast2-s390-4.4.4/src/lib/y2s390/presenters/summary.rb
--- old/yast2-s390-4.4.3/src/lib/y2s390/presenters/summary.rb   2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/src/lib/y2s390/presenters/summary.rb   1970-01-01 
01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
-# Copyright (c) [2022] 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.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, contact SUSE LLC.
-#
-# To contact SUSE LLC about this file by physical or electronic mail, you may
-# find current contact information at www.suse.com.
-
-require "yast"
-
-Yast.import "Mode"
-Yast.import "String"
-
-module Y2S390
-  module Presenters
-    # This class is responsible of returning a configuration summary of the 
given devices
-    class DasdSummary
-      include Yast::Logger
-      include Yast::I18n
-
-      # @return [Y2S390::DasdsCollection]
-      attr_accessor :devices
-
-      # Constructor
-      #
-      # @param devices [Y2S390::DasdsCollection]
-      def initialize(devices)
-        textdomain "s390"
-        @devices = devices
-      end
-
-      # Return a list with the configuration summary for all the devices given 
in text plain
-      #
-      # @return [Array<String>]
-      def list
-        ret = devices.map { |d| format(template, *params(d)) }
-        log.info("Summary: #{ret}")
-        ret
-      end
-
-    private
-
-      # Convenience method to obtain the arguments needed by the configuration 
template to be used
-      # depending on the {Yast::Mode}
-      #
-      # @param device [Y2S390::Dasd]
-      def params(device)
-        return [device.id, device.format, Yast::String.YesNo(device.use_diag)] 
if Yast::Mode.config
-
-        [device.id, device.device_name, Yast::String.YesNo(device.use_diag)]
-      end
-
-      # Return the configuration summary template to be used depending on the 
{Yast::Mode}
-      #
-      # @return [String]
-      def template
-        return _("Channel ID: %s, Format: %s, DIAG: %s") if Yast::Mode.config
-
-        _("Channel ID: %s, Device: %s, DIAG: %s")
-      end
-    end
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/src/modules/DASDController.rb 
new/yast2-s390-4.4.4/src/modules/DASDController.rb
--- old/yast2-s390-4.4.3/src/modules/DASDController.rb  2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/src/modules/DASDController.rb  2022-02-10 
15:54:10.000000000 +0100
@@ -184,8 +184,8 @@
     #
     # @return summary of the current configuration
     def Summary
-      require "y2s390/presenters/summary"
-      Y2S390::Presenters::DasdsSummary.new(Yast::Mode.config ? @devices : 
@devices.active).list
+      require "y2s390/presenters/dasd_summary"
+      Y2S390::Presenters::DasdSummary.new(Yast::Mode.config ? @devices : 
@devices.active).list
     end
 
     # In production, call SCR.Read(.probe.disk).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/test/dasd_controller_test.rb 
new/yast2-s390-4.4.4/test/dasd_controller_test.rb
--- old/yast2-s390-4.4.3/test/dasd_controller_test.rb   2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/test/dasd_controller_test.rb   2022-02-10 
15:54:10.000000000 +0100
@@ -310,4 +310,33 @@
       expect(devices.ids).to eq(imported_ids.reject { |id| id == "0.0.f800" })
     end
   end
+
+  describe "#Summary" do
+    let(:config_mode) { false }
+
+    before do
+      subject.ProbeDisks
+      allow(Yast::Mode).to receive(:config).and_return(config_mode)
+    end
+
+    it "shows a summary of active devices" do
+      expect(subject.Summary).to include(
+        "Channel ID: 0.0.0160, Device: dasda, DIAG: No",
+        "Channel ID: 0.0.0150, Device: dasdb, DIAG: No"
+      )
+    end
+
+    context "in config Mode" do
+      let(:config_mode) { true }
+
+      it "shows a summary of all the devices" do
+        subject.devices.by_id("0.0.0190").format_wanted = true
+        subject.devices.by_id("0.0.0191").diag_wanted = true
+        expect(subject.Summary).to include(
+          "Channel ID: 0.0.0190, Format: Yes, DIAG: No",
+          "Channel ID: 0.0.0191, Format: No, DIAG: Yes"
+        )
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.4.3/test/dasd_dialogs_include_test.rb 
new/yast2-s390-4.4.4/test/dasd_dialogs_include_test.rb
--- old/yast2-s390-4.4.3/test/dasd_dialogs_include_test.rb      1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-s390-4.4.4/test/dasd_dialogs_include_test.rb      2022-02-10 
15:54:10.000000000 +0100
@@ -0,0 +1,70 @@
+#!/usr/bin/env rspec
+
+require_relative "./test_helper"
+
+require_relative "../src/include/s390/dasd/dialogs.rb"
+
+describe Yast::S390DasdDialogsInclude do
+  subject do
+    # create an anonymous YaST module for testing
+    instance = Yast::Module.new
+    Yast.include instance, "s390/dasd/dialogs.rb"
+    instance
+  end
+
+  before do
+    allow(ENV).to receive(:[]).and_call_original
+    allow(ENV).to receive(:[]).with("S390_MOCKING").and_return(true)
+    Yast::DASDController.ProbeDisks()
+  end
+
+  describe "#item_elements_for" do
+    let(:config_mode) { false }
+    let(:dasd) { Yast::DASDController.devices.by_id("0.0.0150") }
+
+    before do
+      allow(Yast::Mode).to receive(:config).and_return(config_mode)
+    end
+
+    it "returns an array" do
+      expect(subject.item_elements_for(dasd)).to be_a(Array)
+    end
+
+    it "returns the Term ID as the first element" do
+      expect(subject.item_elements_for(dasd)[0]).to be_a(Yast::Term)
+      expect(subject.item_elements_for(dasd)[0].value).to eql(:id)
+    end
+
+    context "unless it is in config Mode" do
+      context "when the DASD is not active" do
+        before do
+          allow(dasd).to receive(:active?).and_return(false)
+        end
+
+        it "includes the DASD id, if diag access is active and '--' for the 
rest of elements" do
+          expect(subject.item_elements_for(dasd)[1..-1])
+            .to eql([dasd.id, "--", "--", "--", "No", "--", "--"])
+        end
+      end
+
+      context "when the DASD is active" do
+        it "includes the DASD id, device path, dasd type, type of access, 
format, use diag.." do
+          expect(subject.item_elements_for(dasd)[1..-1]).to eql(
+            [dasd.id, "/dev/dasdb", "3990/E9 3390/0A", "RW", "No", "No", ""]
+          )
+        end
+      end
+    end
+
+    context "in config Mode" do
+      let(:config_mode) { true }
+
+      it "includes the DASD id, format is wanted, use diag is wanted" do
+        expect(subject.item_elements_for(dasd)[1..-1]).to eql([dasd.id, "No", 
"No"])
+        dasd.format_wanted = true
+        dasd.diag_wanted = true
+        expect(subject.item_elements_for(dasd)[1..-1]).to eql([dasd.id, "Yes", 
"Yes"])
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-s390-4.4.3/test/y2s390/presenters/dasd_summary_test.rb 
new/yast2-s390-4.4.4/test/y2s390/presenters/dasd_summary_test.rb
--- old/yast2-s390-4.4.3/test/y2s390/presenters/dasd_summary_test.rb    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-s390-4.4.4/test/y2s390/presenters/dasd_summary_test.rb    
2022-02-10 15:54:10.000000000 +0100
@@ -0,0 +1,47 @@
+#!/usr/bin/env rspec
+
+# Copyright (c) [2022] 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.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "../../test_helper"
+
+require "cwm/rspec"
+require "y2s390/presenters/dasd_summary"
+
+describe Y2S390::Presenters::DasdSummary do
+  subject { described_class.new(devices) }
+  let(:devices) { Yast::DASDController.devices.by_ids(["0.0.0150", 
"0.0.0160"]) }
+
+  mock_entries
+
+  describe "#list" do
+    before do
+      Yast.import "DASDController"
+      Yast::DASDController.ProbeDisks()
+    end
+
+    it "returns a summary of the dasds configuration" do
+      dasd0160 = "Channel ID: 0.0.0160, Device: dasda, DIAG: No"
+      dasd0150 = "Channel ID: 0.0.0150, Device: dasdb, DIAG: No"
+
+      expect(subject.list).to include(dasd0150)
+      expect(subject.list).to include(dasd0160)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-s390-4.4.3/test/y2s390/presenters/summary_test.rb 
new/yast2-s390-4.4.4/test/y2s390/presenters/summary_test.rb
--- old/yast2-s390-4.4.3/test/y2s390/presenters/summary_test.rb 2022-02-03 
11:13:50.000000000 +0100
+++ new/yast2-s390-4.4.4/test/y2s390/presenters/summary_test.rb 1970-01-01 
01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-#!/usr/bin/env rspec
-
-# Copyright (c) [2022] 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.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, contact SUSE LLC.
-#
-# To contact SUSE LLC about this file by physical or electronic mail, you may
-# find current contact information at www.suse.com.
-
-require_relative "../../test_helper"
-
-require "cwm/rspec"
-require "y2s390/presenters/summary"
-
-describe Y2S390::Presenters::DasdSummary do
-  subject { described_class.new(devices) }
-  let(:devices) { Yast::DASDController.devices.by_ids(["0.0.0150", 
"0.0.0160"]) }
-
-  mock_entries
-
-  describe "#list" do
-    before do
-      Yast.import "DASDController"
-      Yast::DASDController.ProbeDisks()
-    end
-
-    it "returns a summary of the dasds configuration" do
-      dasd0160 = "Channel ID: 0.0.0160, Device: dasda, DIAG: No"
-      dasd0150 = "Channel ID: 0.0.0150, Device: dasdb, DIAG: No"
-
-      expect(subject.list).to include(dasd0150)
-      expect(subject.list).to include(dasd0160)
-    end
-  end
-end

Reply via email to