Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2015-08-15 11:39:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2015-08-13 18:10:10.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes   
    2015-08-15 11:39:30.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Aug 13 13:26:56 CEST 2015 - [email protected]
+
+- AutoYaST S390: handling cio_ignore
+  Entry <general><cio_ignore> in order to set it
+  (values: true/false). If it is not set cio_ignore is true.
+  So it is backward compatible.
+  (bnc#941406)
+- cio_ignore does not make sense for KVM or z/VM. So checking
+  for KVM and z/VM and evtl. disabling cio_ignore (fate#317861).
+- 3.1.155
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-3.1.154.tar.bz2

New:
----
  yast2-installation-3.1.155.tar.bz2

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.vB4FCt/_old  2015-08-15 11:39:31.000000000 +0200
+++ /var/tmp/diff_new_pack.vB4FCt/_new  2015-08-15 11:39:31.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.1.154
+Version:        3.1.155
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-installation-3.1.154.tar.bz2 -> yast2-installation-3.1.155.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.154/package/yast2-installation.changes 
new/yast2-installation-3.1.155/package/yast2-installation.changes
--- old/yast2-installation-3.1.154/package/yast2-installation.changes   
2015-08-11 16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/package/yast2-installation.changes   
2015-08-14 17:39:09.000000000 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Thu Aug 13 13:26:56 CEST 2015 - [email protected]
+
+- AutoYaST S390: handling cio_ignore
+  Entry <general><cio_ignore> in order to set it
+  (values: true/false). If it is not set cio_ignore is true.
+  So it is backward compatible.
+  (bnc#941406)
+- cio_ignore does not make sense for KVM or z/VM. So checking
+  for KVM and z/VM and evtl. disabling cio_ignore (fate#317861).
+- 3.1.155
+
+-------------------------------------------------------------------
 Tue Aug 11 15:50:49 CEST 2015 - [email protected]
 
 - AutoYaST second stage: YaST2-Second-Stage.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.154/package/yast2-installation.spec 
new/yast2-installation-3.1.155/package/yast2-installation.spec
--- old/yast2-installation-3.1.154/package/yast2-installation.spec      
2015-08-11 16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/package/yast2-installation.spec      
2015-08-14 17:39:09.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.1.154
+Version:        3.1.155
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.154/src/lib/installation/cio_ignore.rb 
new/yast2-installation-3.1.155/src/lib/installation/cio_ignore.rb
--- old/yast2-installation-3.1.154/src/lib/installation/cio_ignore.rb   
2015-08-11 16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/src/lib/installation/cio_ignore.rb   
2015-08-14 17:39:09.000000000 +0200
@@ -3,6 +3,9 @@
 module Installation
   class CIOIgnore
     include Singleton
+    Yast.import "Mode"
+    Yast.import "AutoinstConfig"
+
     attr_accessor :enabled
 
     def initialize
@@ -10,8 +13,29 @@
     end
 
     def reset
-      # default value requested in FATE#315586
-      @enabled = true
+      if Yast::Mode.autoinst
+        @enabled = Yast::AutoinstConfig.cio_ignore
+      else
+        if kvm? || zvm?
+          # cio_ignore does not make sense for KVM or z/VM (fate#317861)
+          @enabled = false
+        else
+          # default value requested in FATE#315586
+          @enabled = true
+        end
+      end
+    end
+
+    private
+
+    def kvm?
+      File.exist?("/proc/sysinfo") &&
+        File.readlines("/proc/sysinfo").grep(/Control Program: 
KVM\/Linux/).any?
+    end
+
+    def zvm?
+      File.exist?("/proc/sysinfo") &&
+        File.readlines("/proc/sysinfo").grep(/Control Program: z\/VM/).any?
     end
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.154/test/cio_ignore_test.rb 
new/yast2-installation-3.1.155/test/cio_ignore_test.rb
--- old/yast2-installation-3.1.154/test/cio_ignore_test.rb      2015-08-11 
16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/test/cio_ignore_test.rb      2015-08-14 
17:39:09.000000000 +0200
@@ -4,6 +4,26 @@
 
 require "installation/cio_ignore"
 
+describe ::Installation::CIOIgnore do
+  describe "enable/disable" do
+
+    it "take AutoYaST cio_ignore setting" do
+      allow(Yast::Mode).to receive(:autoinst).and_return(true)
+      allow(Yast::AutoinstConfig).to receive(:cio_ignore).and_return(false)
+      ::Installation::CIOIgnore.instance.reset
+      expect(::Installation::CIOIgnore.instance.enabled).to eq(false)
+    end
+
+    it "take default cio_ignore entry if it is in the normal workflow" do
+      allow(Yast::Mode).to receive(:autoinst).and_return(false)
+      expect(Yast::AutoinstConfig).not_to receive(:cio_ignore)
+      ::Installation::CIOIgnore.instance.reset
+      expect(::Installation::CIOIgnore.instance.enabled).to eq(true)
+    end
+
+  end
+end
+
 describe ::Installation::CIOIgnoreProposal do
   subject { ::Installation::CIOIgnoreProposal.new }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.154/test/installation_misc_test.rb 
new/yast2-installation-3.1.155/test/installation_misc_test.rb
--- old/yast2-installation-3.1.154/test/installation_misc_test.rb       
2015-08-11 16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/test/installation_misc_test.rb       
2015-08-14 17:39:09.000000000 +0200
@@ -8,12 +8,6 @@
   include Yast::InstallationMiscInclude
 end
 
-# fake AutoinstConfig to avoid dependency on autoyast
-module Yast
-  class AutoinstConfig
-  end
-end
-
 # we need to mock these modules
 Yast.import "Stage"
 Yast.import "Mode"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.154/test/test_helper.rb 
new/yast2-installation-3.1.155/test/test_helper.rb
--- old/yast2-installation-3.1.154/test/test_helper.rb  2015-08-11 
16:24:11.000000000 +0200
+++ new/yast2-installation-3.1.155/test/test_helper.rb  2015-08-14 
17:39:09.000000000 +0200
@@ -4,6 +4,18 @@
 
 require "yast"
 
+# fake AutoinstConfigClass class which is not supported by Ubuntu
+module Yast
+  # Faked AutoinstConfigClass module
+  class AutoinstConfigClass
+    # we need at least one non-default methods, otherwise ruby-bindings thinks
+    # it is just namespace
+    def fake_method
+    end
+  end
+  AutoinstConfig = AutoinstConfigClass.new
+end
+
 if ENV["COVERAGE"]
   require "simplecov"
   SimpleCov.start do


Reply via email to