Hello community,

here is the log from the commit of package yast2-fcoe-client for 
openSUSE:Factory checked in at 2013-09-29 17:55:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-fcoe-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-fcoe-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-fcoe-client"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-fcoe-client/yast2-fcoe-client.changes      
2013-09-16 12:52:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-fcoe-client.new/yast2-fcoe-client.changes 
2013-09-29 17:55:02.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 26 11:46:14 CEST 2013 - [email protected]
+
+- Improve ruby code
+- version 3.0.2
+
+-------------------------------------------------------------------

Old:
----
  yast2-fcoe-client-3.0.1.tar.bz2

New:
----
  yast2-fcoe-client-3.0.2.tar.bz2

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

Other differences:
------------------
++++++ yast2-fcoe-client.spec ++++++
--- /var/tmp/diff_new_pack.6HJeZj/_old  2013-09-29 17:55:04.000000000 +0200
+++ /var/tmp/diff_new_pack.6HJeZj/_new  2013-09-29 17:55:04.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-fcoe-client
-Version:        3.0.1
+Version:        3.0.2
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-fcoe-client-3.0.1.tar.bz2 -> yast2-fcoe-client-3.0.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-fcoe-client-3.0.1/VERSION 
new/yast2-fcoe-client-3.0.2/VERSION
--- old/yast2-fcoe-client-3.0.1/VERSION 2013-09-14 10:31:49.000000000 +0200
+++ new/yast2-fcoe-client-3.0.2/VERSION 2013-09-26 12:01:20.000000000 +0200
@@ -1 +1 @@
-3.0.1
+3.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-fcoe-client-3.0.1/configure 
new/yast2-fcoe-client-3.0.2/configure
--- old/yast2-fcoe-client-3.0.1/configure       2013-09-14 10:32:07.000000000 
+0200
+++ new/yast2-fcoe-client-3.0.2/configure       2013-09-26 12:01:37.000000000 
+0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-fcoe-client 3.0.1.
+# Generated by GNU Autoconf 2.69 for yast2-fcoe-client 3.0.2.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-fcoe-client'
 PACKAGE_TARNAME='yast2-fcoe-client'
-PACKAGE_VERSION='3.0.1'
-PACKAGE_STRING='yast2-fcoe-client 3.0.1'
+PACKAGE_VERSION='3.0.2'
+PACKAGE_STRING='yast2-fcoe-client 3.0.2'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1249,7 +1249,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-fcoe-client 3.0.1 to adapt to many kinds of 
systems.
+\`configure' configures yast2-fcoe-client 3.0.2 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1321,7 +1321,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-fcoe-client 3.0.1:";;
+     short | recursive ) echo "Configuration of yast2-fcoe-client 3.0.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1401,7 +1401,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-fcoe-client configure 3.0.1
+yast2-fcoe-client configure 3.0.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1418,7 +1418,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-fcoe-client $as_me 3.0.1, which was
+It was created by yast2-fcoe-client $as_me 3.0.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2357,7 +2357,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-fcoe-client'
- VERSION='3.0.1'
+ VERSION='3.0.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2480,7 +2480,7 @@
 
 
 
-VERSION="3.0.1"
+VERSION="3.0.2"
 RPMNAME="yast2-fcoe-client"
 MAINTAINER="Gabriele Mohr <[email protected]>"
 
@@ -3433,7 +3433,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-fcoe-client $as_me 3.0.1, which was
+This file was extended by yast2-fcoe-client $as_me 3.0.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3486,7 +3486,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-fcoe-client config.status 3.0.1
+yast2-fcoe-client config.status 3.0.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-fcoe-client-3.0.1/configure.ac 
new/yast2-fcoe-client-3.0.2/configure.ac
--- old/yast2-fcoe-client-3.0.1/configure.ac    2013-09-14 10:32:03.000000000 
+0200
+++ new/yast2-fcoe-client-3.0.2/configure.ac    2013-09-26 12:01:33.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 3.0.5 - DO NOT EDIT! --
 dnl    (edit configure.ac.in or configure.in.in instead)
 
-AC_INIT(yast2-fcoe-client, 3.0.1, http://bugs.opensuse.org/, yast2-fcoe-client)
+AC_INIT(yast2-fcoe-client, 3.0.2, http://bugs.opensuse.org/, yast2-fcoe-client)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="3.0.1"
+VERSION="3.0.2"
 RPMNAME="yast2-fcoe-client"
 MAINTAINER="Gabriele Mohr <[email protected]>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-fcoe-client-3.0.1/src/clients/fcoe-client_auto.rb 
new/yast2-fcoe-client-3.0.2/src/clients/fcoe-client_auto.rb
--- old/yast2-fcoe-client-3.0.1/src/clients/fcoe-client_auto.rb 2013-07-30 
13:33:16.000000000 +0200
+++ new/yast2-fcoe-client-3.0.2/src/clients/fcoe-client_auto.rb 2013-09-24 
13:31:50.000000000 +0200
@@ -117,18 +117,18 @@
         end
         # Reset info about netcards and get current values
         FcoeClient.ResetNetworkCards
-        @success = FcoeClient.DetectNetworkCards
-        if @success
-          @detected_netcards = FcoeClient.GetNetworkCards
-          Builtins.y2milestone(
-            "Information about detected netcards: %1",
-            @detected_netcards
-          )
-        else
+        @detected_netcards = 
FcoeClient.DetectNetworkCards(FcoeClient.ProbeNetcards)
+
+        if @detected_netcards.empty?
           Builtins.y2error(
             "Cannot detect network cards - stopping auto installation"
           )
           return false
+        else
+           Builtins.y2milestone(
+            "Information about detected netcards: %1",
+            @detected_netcards
+          )
         end
 
         # Check imported data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-fcoe-client-3.0.1/src/clients/inst_fcoe-client.rb 
new/yast2-fcoe-client-3.0.2/src/clients/inst_fcoe-client.rb
--- old/yast2-fcoe-client-3.0.1/src/clients/inst_fcoe-client.rb 2013-07-30 
13:33:16.000000000 +0200
+++ new/yast2-fcoe-client-3.0.2/src/clients/inst_fcoe-client.rb 2013-09-24 
13:31:50.000000000 +0200
@@ -74,21 +74,20 @@
       @success = FcoeClient.ServiceStatus
       if !@success
         Builtins.y2error("Starting of services FAILED")
-        return nil
       end
 
       # detect netcards
-      @success = FcoeClient.DetectNetworkCards
-      if !@success
+      netcards = FcoeClient.DetectNetworkCards(FcoeClient.ProbeNetcards)
+      if netcards.empty?
         Builtins.y2error("Detecting netcards FAILED")
-        return nil
+      else
+        FcoeClient.SetNetworkCards(netcards)
       end
 
       # read general FCoE settings
       @success = FcoeClient.ReadFcoeConfig
       if !@success
         Builtins.y2error("Reading /etc/fcoe/config FAILED")
-        return nil
       end
 
       # run dialog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-fcoe-client-3.0.1/src/include/fcoe-client/complex.rb 
new/yast2-fcoe-client-3.0.2/src/include/fcoe-client/complex.rb
--- old/yast2-fcoe-client-3.0.1/src/include/fcoe-client/complex.rb      
2013-07-30 13:33:16.000000000 +0200
+++ new/yast2-fcoe-client-3.0.2/src/include/fcoe-client/complex.rb      
2013-09-24 13:31:50.000000000 +0200
@@ -304,7 +304,8 @@
         AdjustButtons()
       elsif action == :retry
         FcoeClient.ResetNetworkCards
-        FcoeClient.DetectNetworkCards
+        netcards = FcoeClient.DetectNetworkCards(FcoeClient.ProbeNetcards)
+        FcoeClient.SetNetworkCards(netcards)
         ShowInterfaces()
       elsif action == :create
         # haendel:~/:[0]# fipvlan -c -s eth3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-fcoe-client-3.0.1/src/modules/FcoeClient.rb 
new/yast2-fcoe-client-3.0.2/src/modules/FcoeClient.rb
--- old/yast2-fcoe-client-3.0.1/src/modules/FcoeClient.rb       2013-09-12 
15:03:37.000000000 +0200
+++ new/yast2-fcoe-client-3.0.2/src/modules/FcoeClient.rb       2013-09-23 
14:16:48.000000000 +0200
@@ -106,8 +106,9 @@
       # map containing information about start of services at boot
       @service_start = { "fcoe" => true, "lldpad" => true }
 
-      # map containing information about networks cards and VLAN, FCoE and DCB 
status
+      # list of maps containing information about networks cards and VLAN, 
FCoE and DCB status
       @network_interfaces = []
+
       FcoeClient()
     end
 
@@ -358,8 +359,7 @@
     #   Return:
     #   { "eth0" => [{ "vlan" => "200", "fcf" => "00:0d:ec:a2:ef:00" },
     #                { "vlan" => "300", "fcf" => "00:0d:ec:a2:ef:01" }],
-    #     "eth1" => [],
-    #     "eth2" => [{ "vlan" => "200", "fcf" => "00:0d:ec:a2:ef:00" }]
+    #     "eth2" => [{ "vlan" => "200", "fcf" => "00:0d:ec:a2:ef:02" }]
     #   }
     #
     def GetVlanInterfaces(net_devices, fcoe_info)
@@ -767,16 +767,10 @@
       deep_copy(configured_vlans)
     end
 
-    # list <map> network_interfaces
-    #
-    # dev_name  mac_addr  device     vlan_interface  fcoe_vlan  fcoe_enable 
dcb_required auto_vlan dcb_capable cfg_device
-    # eth3      08:00:... Gigabit... 200             eth3.200   yes/no      
yes/no       yes/no    yes/no      eth3.200
     #
-    # Detect network interface cards (hardware probe) and get status
+    # Detect network interface cards (hardware probe)
     #
-    def DetectNetworkCards
-      netcards = []
-
+    def ProbeNetcards
       if !TestMode()
         netcards = Convert.convert(
           SCR.Read(path(".probe.netcard")),
@@ -810,7 +804,7 @@
             "bus_hwcfg" => "pci",
             "class_id"  => 2,
             "dev_name"  => "eth2",
-            "dev_names" => ["eth15"],
+            "dev_names" => ["eth2"],
             "model"     => "Intel PRO/1000 MT Desktop Adapter",
             "resource"  => { "hwaddr" => [{ "addr" => "08:23:27:99:64:78" }] }
           }
@@ -818,7 +812,18 @@
       end
       Builtins.y2milestone("Detected netcards: %1", netcards)
 
-      return false if netcards == [] || netcards == nil
+      netcards
+    end
+
+    # list <map> network_interfaces
+    #
+    # dev_name  mac_addr  device     vlan_interface  fcoe_vlan  fcoe_enable 
dcb_required auto_vlan dcb_capable cfg_device
+    # eth3      08:00:... Gigabit... 200             eth3.200   yes/no      
yes/no       yes/no    yes/no      eth3.200
+    #
+    # Get the network cards and check Fcoe status
+    #
+    def DetectNetworkCards(netcards)
+      return [] if netcards == nil
 
       net_devices = []
 
@@ -832,6 +837,7 @@
       # The 'fipvlan' command which is called in GetVlanInterfaces configures 
the interfaces itself,
       # therefore it's not needed any longer to call 'ifconfig <if> up' here.
       vlan_info = GetVlanInterfaces(net_devices, GetFcoeInfo(net_devices) )
+      network_interfaces = []
 
       netcards.each do |card|
         device = card["dev_name"] || ""
@@ -850,7 +856,7 @@
             "fcoe_vlan"  => fcoe_vlan_interface
           }
 
-          @network_interfaces = @network_interfaces << info_map
+          network_interfaces = network_interfaces << info_map
         else
           # add infos about card and VLAN interfaces
           vlans = Ops.get(vlan_info, device, [])
@@ -916,17 +922,18 @@
               "cfg_device"     => status_map["cfg_device"] || "" # part of 
cfg-file name, e.g. eth3.200
             }
 
-            @network_interfaces = @network_interfaces << info_map
+            network_interfaces = network_interfaces << info_map
           end # do |vlan|
         end # else
       end # do |card|
 
       # sort the list of interfaces (eth0, eth1, eth2...)
-      @network_interfaces = Builtins.sort(@network_interfaces) do |a, b|
+      network_interfaces = Builtins.sort(network_interfaces) do |a, b|
         Ops.less_than(a["dev_name"] || "", b["dev_name"] || "")
       end
 
-      true
+      Builtins.y2milestone("Returning: %1", network_interfaces)
+      network_interfaces
     end
 
     #
@@ -1311,10 +1318,10 @@
       Progress.NextStage
 
       # detect netcards
-      success = DetectNetworkCards()
+      @network_interfaces = DetectNetworkCards(ProbeNetcards())
 
       # Error message
-      Report.Warning(_("Cannot detect devices.")) if !success
+      Report.Warning(_("Cannot detect devices.")) if @network_interfaces.empty?
       Builtins.sleep(sl)
 
       return false if PollAbort()

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to