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 2023-07-04 15:23:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-s390 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-s390.new.23466 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-s390"

Tue Jul  4 15:23:16 2023 rev:33 rq:1096795 version:4.6.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-s390/yast2-s390.changes    2023-06-16 
16:56:45.266383585 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-s390.new.23466/yast2-s390.changes 
2023-07-04 15:24:04.278815497 +0200
@@ -1,0 +2,8 @@
+Tue Jul  4 09:01:24 UTC 2023 - José Iván López González <[email protected]>
+
+- Fix detection of the zFCP controller running mode to check
+  whether the controller is doing auto LUN scan (related to
+  gh#openSUSE/agama#634).
+- 4.6.4
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-s390.spec ++++++
--- /var/tmp/diff_new_pack.j3u72U/_old  2023-07-04 15:24:04.762818406 +0200
+++ /var/tmp/diff_new_pack.j3u72U/_new  2023-07-04 15:24:04.766818429 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.6.3
+Version:        4.6.4
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only

++++++ yast2-s390-4.6.3.tar.bz2 -> yast2-s390-4.6.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.6.3/package/yast2-s390.changes 
new/yast2-s390-4.6.4/package/yast2-s390.changes
--- old/yast2-s390-4.6.3/package/yast2-s390.changes     2023-06-16 
11:42:50.000000000 +0200
+++ new/yast2-s390-4.6.4/package/yast2-s390.changes     2023-07-04 
14:31:03.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Tue Jul  4 09:01:24 UTC 2023 - José Iván López González <[email protected]>
+
+- Fix detection of the zFCP controller running mode to check
+  whether the controller is doing auto LUN scan (related to
+  gh#openSUSE/agama#634).
+- 4.6.4
+
+-------------------------------------------------------------------
 Wed Jun 14 14:38:18 UTC 2023 - José Iván López González <[email protected]>
 
 - Add info about allow_lun_scan option (related to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.6.3/package/yast2-s390.spec 
new/yast2-s390-4.6.4/package/yast2-s390.spec
--- old/yast2-s390-4.6.3/package/yast2-s390.spec        2023-06-16 
11:42:50.000000000 +0200
+++ new/yast2-s390-4.6.4/package/yast2-s390.spec        2023-07-04 
14:31:03.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-s390
-Version:        4.6.3
+Version:        4.6.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.6.3/src/lib/y2s390/zfcp.rb 
new/yast2-s390-4.6.4/src/lib/y2s390/zfcp.rb
--- old/yast2-s390-4.6.3/src/lib/y2s390/zfcp.rb 2023-06-16 11:42:50.000000000 
+0200
+++ new/yast2-s390-4.6.4/src/lib/y2s390/zfcp.rb 2023-07-04 14:31:03.000000000 
+0200
@@ -120,11 +120,11 @@
     # @param channel [String] E.g., "0.0.fa00"
     # @return [Boolean]
     def lun_scan_controller?(channel)
-      file = 
"/sys/bus/ccw/drivers/zfcp/#{channel}/host0/fc_host/host0/port_type"
-      return false unless allow_lun_scan? && File.exist?(file)
+      files = 
Dir["/sys/bus/ccw/drivers/zfcp/#{channel}/host*/fc_host/host*/port_type"]
+      return false unless allow_lun_scan? && files.any?
 
-      mode = Yast::SCR.Read(path(".target.string"), file).chomp
-      mode == "NPIV VPORT"
+      port_types = files.map { |f| Yast::SCR.Read(path(".target.string"), 
f).chomp }
+      port_types.any? { |t| t == "NPIV VPORT" }
     end
 
     # Runs the command for activating a zFCP disk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-s390-4.6.3/test/y2s390/zfcp_test.rb 
new/yast2-s390-4.6.4/test/y2s390/zfcp_test.rb
--- old/yast2-s390-4.6.3/test/y2s390/zfcp_test.rb       2023-06-16 
11:42:50.000000000 +0200
+++ new/yast2-s390-4.6.4/test/y2s390/zfcp_test.rb       2023-07-04 
14:31:03.000000000 +0200
@@ -180,18 +180,14 @@
         .with(anything, "/sys/module/zfcp/parameters/allow_lun_scan")
         .and_return(allow_lun_scan)
 
-      allow(File).to receive(:exist?)
-        
.with("/sys/bus/ccw/drivers/zfcp/0.0.fa00/host0/fc_host/host0/port_type")
-        .and_return(controller_active)
-
-      allow(Yast::SCR).to receive(:Read)
-        .with(anything, 
"/sys/bus/ccw/drivers/zfcp/0.0.fa00/host0/fc_host/host0/port_type")
-        .and_return(controller_mode)
+      allow(Dir).to receive(:[])
+        
.with("/sys/bus/ccw/drivers/zfcp/0.0.fa00/host*/fc_host/host*/port_type")
+        .and_return(port_type_files)
     end
 
     let(:allow_lun_scan) { nil }
 
-    let(:controller_active) { nil }
+    let(:port_type_files) { [] }
 
     let(:controller_mode) { nil }
 
@@ -206,7 +202,7 @@
     context "if allow_lun_scan is active and the controller is not active" do
       let(:allow_lun_scan) { true }
 
-      let(:controller_active) { false }
+      let(:port_type_files) { [] }
 
       it "returns false" do
         expect(subject.lun_scan_controller?("0.0.fa00")).to eq(false)
@@ -216,7 +212,13 @@
     context "if allow_lun_scan is active and the controller is active" do
       let(:allow_lun_scan) { true }
 
-      let(:controller_active) { true }
+      let(:port_type_files) { 
["/sys/bus/ccw/drivers/zfcp/0.0.fa00/host0/fc_host/host0/port_type"] }
+
+      before do
+        allow(Yast::SCR).to receive(:Read)
+          .with(anything, 
"/sys/bus/ccw/drivers/zfcp/0.0.fa00/host0/fc_host/host0/port_type")
+          .and_return(controller_mode)
+      end
 
       context "and the controller is not running in NPIV mode" do
         let(:controller_mode) { "" }

Reply via email to