Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2013-11-29 21:25:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2013-11-28 19:09:25.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2013-11-29 21:25:11.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Nov 29 13:38:11 UTC 2013 - [email protected]
+
+- fix DHCP capable cards client to not break installation
+- 3.1.10
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-3.1.9.tar.bz2

New:
----
  yast2-network-3.1.10.tar.bz2

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.JVHVxN/_old  2013-11-29 21:25:12.000000000 +0100
+++ /var/tmp/diff_new_pack.JVHVxN/_new  2013-11-29 21:25:12.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.9
+Version:        3.1.10
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-3.1.9.tar.bz2 -> yast2-network-3.1.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.9/VERSION 
new/yast2-network-3.1.10/VERSION
--- old/yast2-network-3.1.9/VERSION     2013-11-28 16:28:28.000000000 +0100
+++ new/yast2-network-3.1.10/VERSION    2013-11-29 16:22:59.000000000 +0100
@@ -1 +1 @@
-3.1.9
+3.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.9/package/yast2-network.changes 
new/yast2-network-3.1.10/package/yast2-network.changes
--- old/yast2-network-3.1.9/package/yast2-network.changes       2013-11-28 
16:28:28.000000000 +0100
+++ new/yast2-network-3.1.10/package/yast2-network.changes      2013-11-29 
16:22:59.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Nov 29 13:38:11 UTC 2013 - [email protected]
+
+- fix DHCP capable cards client to not break installation
+- 3.1.10
+
+-------------------------------------------------------------------
 Thu Nov 28 15:07:16 UTC 2013 - [email protected]
 
 - fix distribution of client for detection DHCP capable cards
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.9/package/yast2-network.spec 
new/yast2-network-3.1.10/package/yast2-network.spec
--- old/yast2-network-3.1.9/package/yast2-network.spec  2013-11-28 
16:28:28.000000000 +0100
+++ new/yast2-network-3.1.10/package/yast2-network.spec 2013-11-29 
16:22:59.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.9
+Version:        3.1.10
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.9/src/clients/inst_setup_dhcp.rb 
new/yast2-network-3.1.10/src/clients/inst_setup_dhcp.rb
--- old/yast2-network-3.1.9/src/clients/inst_setup_dhcp.rb      2013-11-28 
16:28:28.000000000 +0100
+++ new/yast2-network-3.1.10/src/clients/inst_setup_dhcp.rb     2013-11-29 
16:22:59.000000000 +0100
@@ -1,60 +1,63 @@
 Yast.import "LanItems"
 Yast.import "NetworkInterfaces"
 
-include Yast
+#enclose client into own namespace to prevent messing global namespace
+module SetupDHCPClient
+  include Yast
+
+  BASH_PATH = Path.new(".target.bash")
+
+  def self.network_cards
+    LanItems.Read
+    LanItems.GetNetcardNames
+  end
 
-BASH_PATH = Path.new(".target.bash")
+  def self.setup_dhcp card
+    index = LanItems.FindDeviceIndex(card)
 
-def network_cards
-  LanItems.Read
-  LanItems.GetNetcardNames
-end
+    if index == -1
+      raise "Failed to save configuration for device #{card}"
+    end
+
+    LanItems.current = index
+    LanItems.SetItem
+
+    #tricky part if ifcfg is not set
+    # yes, this code smell and show bad API of LanItems
+    if !LanItems.IsCurrentConfigured
+      NetworkInterfaces.Add
+      current = LanItems.Items[LanItems.current]
+      current["ifcfg"] = card
+    end
 
-def setup_dhcp card
-  index = LanItems.FindDeviceIndex(card)
+    LanItems.bootproto = "dhcp"
+    LanItems.startmode = "auto"
 
-  if index == -1
-    raise "Failed to save configuration for device #{card}"
+    LanItems.Commit
   end
 
-  LanItems.current = index
-  LanItems.SetItem
-
-  #tricky part if ifcfg is not set
-  # yes, this code smell and show bad API of LanItems
-  if !LanItems.IsCurrentConfigured
-    NetworkInterfaces.Add
-    current = LanItems.Items[LanItems.current]
-    current["ifcfg"] = card
+  def self.get_lease?(card)
+    SCR.Execute(BASH_PATH, "dhcpcd-test '#{card}'") == 0
   end
 
-  LanItems.bootproto = "dhcp"
-  LanItems.startmode = "auto"
-
-  LanItems.Commit
-end
-
-def get_lease?(card)
-  SCR.Execute(BASH_PATH, "dhcpcd-test '#{card}'") == 0
-end
-
-def start_dhcp(card)
-  SCR.Execute(BASH_PATH, "dhcpcd '#{card}'") == 0
-end
+  def self.start_dhcp(card)
+    SCR.Execute(BASH_PATH, "dhcpcd '#{card}'") == 0
+  end
 
-def write_configuration
-  NetworkInterfaces.Write("")
-end
+  def self.write_configuration
+    NetworkInterfaces.Write("")
+  end
 
 
 # TODO time consuming, some progress would be nice
-dhcp_cards = network_cards.select { |c| get_lease?(c) }
+  dhcp_cards = network_cards.select { |c| get_lease?(c) }
 
-dhcp_cards.each do |dcard|
-  setup_dhcp(dcard) # make DHCP setup persistent
-  start_dhcp(dcard)
-end
+  dhcp_cards.each do |dcard|
+    setup_dhcp(dcard) # make DHCP setup persistent
+    start_dhcp(dcard)
+  end
 
-write_configuration
+  write_configuration
+end
 
 :next

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

Reply via email to