Hello community,

here is the log from the commit of package yast2-s390 for openSUSE:Factory 
checked in at 2019-12-12 23:18:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-s390 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-s390.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-s390"

Thu Dec 12 23:18:13 2019 rev:13 rq:755877 version:4.2.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-s390/yast2-s390.changes    2019-07-23 
22:36:18.918984535 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-s390.new.4691/yast2-s390.changes  
2019-12-12 23:18:28.330211818 +0100
@@ -1,0 +2,7 @@
+Wed Dec 11 14:29:18 CET 2019 - sch...@suse.de
+
+- Activating dumpconf: Ask the user to deactivate active kdump
+  because they are conflicting each other (jsc#SLE-7749).
+- 4.2.3
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-s390.spec ++++++
--- /var/tmp/diff_new_pack.KEHmkk/_old  2019-12-12 23:18:28.726211783 +0100
+++ /var/tmp/diff_new_pack.KEHmkk/_new  2019-12-12 23:18:28.730211783 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.2.2
+Version:        4.2.3
 Release:        0
 Summary:        YaST2 - S/390 Specific Features Configuration
 License:        GPL-2.0-only

++++++ yast2-s390-4.2.2.tar.bz2 -> yast2-s390-4.2.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.2.2/package/yast2-s390.changes 
new/yast2-s390-4.2.3/package/yast2-s390.changes
--- old/yast2-s390-4.2.2/package/yast2-s390.changes     2019-07-22 
21:03:57.000000000 +0200
+++ new/yast2-s390-4.2.3/package/yast2-s390.changes     2019-12-11 
15:45:25.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Dec 11 14:29:18 CET 2019 - sch...@suse.de
+
+- Activating dumpconf: Ask the user to deactivate active kdump
+  because they are conflicting each other (jsc#SLE-7749).
+- 4.2.3
+
+-------------------------------------------------------------------
 Fri Jul 19 11:57:09 CEST 2019 - aschn...@suse.com
 
 - handle setting diag mode on active DASDs (part of bsc#1134927)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.2.2/package/yast2-s390.spec 
new/yast2-s390-4.2.3/package/yast2-s390.spec
--- old/yast2-s390-4.2.2/package/yast2-s390.spec        2019-07-22 
21:03:57.000000000 +0200
+++ new/yast2-s390-4.2.3/package/yast2-s390.spec        2019-12-11 
15:45:25.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.2.2
+Version:        4.2.3
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.2.2/src/include/s390/onpanic/ui.rb 
new/yast2-s390-4.2.3/src/include/s390/onpanic/ui.rb
--- old/yast2-s390-4.2.2/src/include/s390/onpanic/ui.rb 2019-07-22 
21:03:57.000000000 +0200
+++ new/yast2-s390-4.2.3/src/include/s390/onpanic/ui.rb 2019-12-11 
15:45:25.000000000 +0100
@@ -26,6 +26,8 @@
 #
 module Yast
   module S390OnpanicUiInclude
+    KDUMP_SERVICE_NAME = "kdump".freeze
+
     def initialize_s390_onpanic_ui(_include_target)
       Yast.import "UI"
 
@@ -37,6 +39,7 @@
       Yast.import "Package"
       Yast.import "Popup"
       Yast.import "Wizard"
+      Yast.import "Service"
 
       # Should dumpconf be started?
       @start = false
@@ -312,6 +315,24 @@
       ret
     end
 
+    # Check if kdump is enabled. If yes, ask the user to disable it
+    # because it conflicts with OnPanic
+    def check_kdump
+      if OnPanic.start &&
+          (Service.Enabled(KDUMP_SERVICE_NAME) || 
Service.Active(KDUMP_SERVICE_NAME))
+        if Yast::Popup.YesNo(
+          # TRANSLATORS: %{s1},%{s2} are the service names
+          _(
+            "The service %{s1} is active and will conflict with dumpconf.\n" \
+            "Would you like to disable %{s2}? \n"
+          ) % { s1: KDUMP_SERVICE_NAME, s2: KDUMP_SERVICE_NAME }
+        )
+          Service.Disable(KDUMP_SERVICE_NAME)
+          Service.Stop(KDUMP_SERVICE_NAME) if 
Service.active?(KDUMP_SERVICE_NAME)
+        end
+      end
+    end
+
     # The whole sequence
     def OnPanicSequence
       Wizard.CreateDialog
@@ -320,7 +341,10 @@
       OnPanic.Read
 
       ret = OnPanicDialog()
-      OnPanic.Write if ret == :next || ret == :finish || ret == :ok
+      if [:next, :finish, :ok].include?(ret)
+        check_kdump
+        OnPanic.Write
+      end
 
       UI.CloseDialog
       ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.2.2/test/ui_onpanic_include_test.rb 
new/yast2-s390-4.2.3/test/ui_onpanic_include_test.rb
--- old/yast2-s390-4.2.2/test/ui_onpanic_include_test.rb        1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-s390-4.2.3/test/ui_onpanic_include_test.rb        2019-12-11 
15:45:25.000000000 +0100
@@ -0,0 +1,69 @@
+#!/usr/bin/env rspec
+
+require_relative "./test_helper"
+
+require_relative "../src/include/s390/onpanic/ui.rb"
+
+Yast.import "Wizard"
+Yast.import "OnPanic"
+
+describe Yast::S390OnpanicUiInclude do
+  subject do
+    # create an anonymous YaST module for testing
+    instance = Yast::Module.new
+    Yast.include instance, "s390/onpanic/ui.rb"
+    instance
+  end
+
+  describe "#OnPanicSequence" do
+
+    let(:ret) { :next }
+
+    before do
+      allow(Yast::Wizard).to receive(:CreateDialog)
+      allow(Yast::Wizard).to receive(:SetDesktopIcon)
+      allow(Yast::Wizard).to receive(:CloseDialog)
+      allow(Yast::OnPanic).to receive(:Read)
+      allow(subject).to receive(:OnPanicDialog).and_return(ret)
+    end
+
+    it "opens a new dialog and sets the icon" do
+      expect(Yast::Wizard).to receive(:CreateDialog)
+      expect(Yast::Wizard).to receive(:SetDesktopIcon)
+      subject.OnPanicSequence
+    end
+
+    it "closes the dialog at the end" do
+      expect(Yast::UI).to receive(:CloseDialog)
+      subject.OnPanicSequence
+    end
+
+    it "returns the result of the OnPanicDialog call" do
+      # "equal" checks the object identity (the object ID)
+      expect(subject.OnPanicSequence).to equal(ret)
+    end
+
+    context "kdump is active while setup dumpconf" do
+      it "asks the user to disable kdump" do
+        expect(Yast::OnPanic).to receive(:start).and_return(true)
+        expect(Yast::Service).to 
receive(:Enabled).with("kdump").and_return(true)
+        allow(Yast::Service).to 
receive(:Active).with("kdump").and_return(false)
+        expect(Yast::Popup).to receive(:YesNo).and_return(true)
+        expect(Yast::Service).to receive(:Disable).with("kdump")
+        subject.OnPanicSequence
+      end
+    end
+
+    context "kdump is not active while setup dumpconf" do
+      it "does not ask the user and does not touch kdump" do
+        expect(Yast::OnPanic).to receive(:start).and_return(true)
+        expect(Yast::Service).to 
receive(:Enabled).with("kdump").and_return(false)
+        allow(Yast::Service).to 
receive(:Active).with("kdump").and_return(false)
+        expect(Yast::Popup).not_to receive(:YesNo)
+        expect(Yast::Service).not_to receive(:Disable).with("kdump")
+        subject.OnPanicSequence
+      end
+    end
+  end
+
+end


Reply via email to