Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2017-10-23 16:42:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Mon Oct 23 16:42:40 2017 rev:413 rq:535235 version:4.0.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2017-10-07 
17:49:15.295024681 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2017-10-23 
16:42:41.714439989 +0200
@@ -1,0 +2,9 @@
+Thu Oct 19 14:42:09 CEST 2017 - [email protected]
+
+- Fixing disabling vnc, ssh, ... installation to handle service
+  names independently on using upper/lower case as they are used
+  in different context at different places of the code
+  (bsc#1055279).
+- 4.0.11
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.0.10.tar.bz2

New:
----
  yast2-4.0.11.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.ECPlLg/_old  2017-10-23 16:42:42.338410787 +0200
+++ /var/tmp/diff_new_pack.ECPlLg/_new  2017-10-23 16:42:42.338410787 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.0.10
+Version:        4.0.11
 Release:        0
 Summary:        YaST2 - Main Package
 License:        GPL-2.0

++++++ yast2-4.0.10.tar.bz2 -> yast2-4.0.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.10/library/general/src/modules/Linuxrc.rb 
new/yast2-4.0.11/library/general/src/modules/Linuxrc.rb
--- old/yast2-4.0.10/library/general/src/modules/Linuxrc.rb     2017-10-06 
13:34:57.439539673 +0200
+++ new/yast2-4.0.11/library/general/src/modules/Linuxrc.rb     2017-10-19 
15:50:11.236545051 +0200
@@ -244,12 +244,16 @@
     # Reset settings for vnc, ssh,... in install.inf which have been made
     # by linuxrc settings.
     #
-    # @param [Array<String>] list of services which will be disabled.
+    # @param [Array<String>] list of remote-management services that will be 
disabled.
     def disable_remote(services)
       return if !services || services.empty?
-      log.warn "Disabling #{services} due missing packages."
+
+      log.warn "Disabling #{services} due to missing packages."
       services.each do |service|
-        case service
+        # Service IDs are also used in another context in the code
+        # Making sure we always compare apples with apples
+        case polish(service.dup)
+
         when "vnc"
           SCR.Write(path(".etc.install_inf.VNC"), 0)
           SCR.Write(path(".etc.install_inf.VNCPassword"), "")
@@ -257,10 +261,11 @@
           SCR.Write(path(".etc.install_inf.UseSSH"), 0)
         when "braille"
           SCR.Write(path(".etc.install_inf.Braille"), 0)
-        when "display-ip"
+        when "displayip"
           SCR.Write(path(".etc.install_inf.DISPLAY_IP"), 0)
         else
-          log.error "#{service} not supported"
+          log.error "Unknown service #{service}"
+          raise ArgumentError, "Cannot disable #{service}: Unknown service."
         end
       end
       SCR.Write(path(".etc.install_inf"), nil) # Flush the cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.10/library/general/test/linuxrc_test.rb 
new/yast2-4.0.11/library/general/test/linuxrc_test.rb
--- old/yast2-4.0.10/library/general/test/linuxrc_test.rb       2017-10-06 
13:34:57.451539673 +0200
+++ new/yast2-4.0.11/library/general/test/linuxrc_test.rb       2017-10-19 
15:50:11.396545051 +0200
@@ -237,31 +237,45 @@
         .with(path(".etc.install_inf"), nil)
     end
 
-    context "when vnc will be disabled" do
+    context "when vnc should be disabled" do
       it "updates install.inf" do
+        # twice, because there are two services, thus two calls to do the same
         expect(Yast::SCR).to receive(:Write)
-          .with(path(".etc.install_inf.VNC"), 0)
+          .with(path(".etc.install_inf.VNC"), 0).twice
+        # twice, because there are two services, thus two calls to do the same
         expect(Yast::SCR).to receive(:Write)
-          .with(path(".etc.install_inf.VNCPassword"), "")
-        subject.disable_remote(["vnc"])
+          .with(path(".etc.install_inf.VNCPassword"), "").twice
+        subject.disable_remote(["vnc", "VNC"])
       end
     end
 
-    context "when ssh will be disabled" do
+    context "when ssh should be disabled" do
       it "updates install.inf" do
+        # twice, because there are two services, thus two calls to do the same
         expect(Yast::SCR).to receive(:Write)
-          .with(path(".etc.install_inf.UseSSH"), 0)
-        subject.disable_remote(["ssh"])
+          .with(path(".etc.install_inf.UseSSH"), 0).twice
+        subject.disable_remote(["sSh", "ssh"])
       end
     end
 
-    context "when braille and dispaly_ip will be disabled" do
+    context "when braille and dispaly_ip should be disabled" do
       it "updates install.inf" do
         expect(Yast::SCR).to receive(:Write)
           .with(path(".etc.install_inf.Braille"), 0)
+        # twice, because there are two services, thus two calls to do the same
         expect(Yast::SCR).to receive(:Write)
-          .with(path(".etc.install_inf.DISPLAY_IP"), 0)
-        subject.disable_remote(["braille", "display-ip"])
+          .with(path(".etc.install_inf.DISPLAY_IP"), 0).twice
+        subject.disable_remote(["braille", "display-ip", "DiSplaY_IP"])
+      end
+    end
+
+    context "when trying to disable an unknown service" do
+      it "throws an exception" do
+        # for other (valid) services
+        allow(Yast::SCR).to receive(:Write)
+
+        unknown_service = "uNkNown-ser_vice"
+        expect { subject.disable_remote(["SSH", unknown_service]) }.to 
raise_error(ArgumentError, /Cannot disable #{unknown_service}/)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.10/package/yast2.changes 
new/yast2-4.0.11/package/yast2.changes
--- old/yast2-4.0.10/package/yast2.changes      2017-10-06 13:34:57.531539673 
+0200
+++ new/yast2-4.0.11/package/yast2.changes      2017-10-19 15:50:12.004545051 
+0200
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
+Thu Oct 19 14:42:09 CEST 2017 - [email protected]
+
+- Fixing disabling vnc, ssh, ... installation to handle service
+  names independently on using upper/lower case as they are used
+  in different context at different places of the code
+  (bsc#1055279).
+- 4.0.11
+
+-------------------------------------------------------------------
 Thu Oct  5 14:04:46 UTC 2017 - [email protected]
 
 - Disable vnc, ssh,... installation in install.inf if it is not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.0.10/package/yast2.spec 
new/yast2-4.0.11/package/yast2.spec
--- old/yast2-4.0.10/package/yast2.spec 2017-10-06 13:34:57.531539673 +0200
+++ new/yast2-4.0.11/package/yast2.spec 2017-10-19 15:50:12.008545051 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.0.10
+Version:        4.0.11
 Release:        0
 Summary:        YaST2 - Main Package
 License:        GPL-2.0


Reply via email to