Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2015-07-25 07:44:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      
2015-07-05 17:52:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2015-07-25 07:44:05.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul  1 11:21:36 UTC 2015 - [email protected]
+
+- bnc#864264
+  - fixed internal error in adding alias
+- 3.1.122
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.vpYil4/_old  2015-07-25 07:44:06.000000000 +0200
+++ /var/tmp/diff_new_pack.vpYil4/_new  2015-07-25 07:44:06.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.121
+Version:        3.1.122
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-3.1.121.tar.bz2 -> yast2-network-3.1.122.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.121/package/yast2-network.changes 
new/yast2-network-3.1.122/package/yast2-network.changes
--- old/yast2-network-3.1.121/package/yast2-network.changes     2015-07-02 
17:17:43.000000000 +0200
+++ new/yast2-network-3.1.122/package/yast2-network.changes     2015-07-23 
17:57:12.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Jul  1 11:21:36 UTC 2015 - [email protected]
+
+- bnc#864264
+  - fixed internal error in adding alias
+- 3.1.122
+
+-------------------------------------------------------------------
 Tue Jun 30 16:18:26 UTC 2015 - [email protected]
 
 - Fixed warnings like 'duplicated key at line 230 ignored:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.121/package/yast2-network.spec 
new/yast2-network-3.1.122/package/yast2-network.spec
--- old/yast2-network-3.1.121/package/yast2-network.spec        2015-07-02 
17:17:43.000000000 +0200
+++ new/yast2-network-3.1.122/package/yast2-network.spec        2015-07-23 
17:57:12.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.121
+Version:        3.1.122
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.121/src/clients/lan.rb 
new/yast2-network-3.1.122/src/clients/lan.rb
--- old/yast2-network-3.1.121/src/clients/lan.rb        2015-07-02 
17:17:43.000000000 +0200
+++ new/yast2-network-3.1.122/src/clients/lan.rb        2015-07-23 
17:57:12.000000000 +0200
@@ -133,6 +133,7 @@
             "type" => "string"
           },
           "bootproto"    => {
+            # Commandline option help
             "help" => _("Use static or dynamic configuration"),
             "type" => "string"
           },
@@ -140,11 +141,6 @@
             "help" => _("Configuration Name"),
             "type" => "string"
           },
-          "bootproto"    => {
-            # Commandline option help
-            "help" => _("Device boot protocol"),
-            "type" => "string"
-          },
           "ip"           => {
             # Commandline option help
             "help" => _("Device IP address"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.1.121/src/include/network/lan/virtual.rb 
new/yast2-network-3.1.122/src/include/network/lan/virtual.rb
--- old/yast2-network-3.1.121/src/include/network/lan/virtual.rb        
2015-07-02 17:17:43.000000000 +0200
+++ new/yast2-network-3.1.122/src/include/network/lan/virtual.rb        
2015-07-23 17:57:12.000000000 +0200
@@ -97,20 +97,16 @@
         cur = Convert.to_integer(UI.QueryWidget(Id(:table), :CurrentItem))
         case Ops.get_symbol(event, "ID", :nil)
         when :edit
-          @item = VirtualEditDialog(cur, Ops.get(table_items, cur), [])
+          @item = VirtualEditDialog(cur, Ops.get(table_items, cur))
           if [email protected]?
             Ops.set(table_items, cur, @item)
             UI.ChangeWidget(Id(:table), :Items, table_items)
             UI.ChangeWidget(Id(:table), :CurrentItem, cur)
           end
         when :add
-          @forbidden = Builtins.maplist(table_items) do |e|
-            Ops.get_string(e, 1, "")
-          end
           @item2 = VirtualEditDialog(
             Builtins.size(table_items),
-            term(:empty),
-            @forbidden
+            term(:empty)
           )
           Builtins.y2debug("item=%1", @item2)
           if [email protected]?
@@ -195,12 +191,14 @@
     # max length of device / interface filename lenght supported by kernel
     IFACE_LABEL_MAX = 16
 
-    def VirtualEditDialog(id, entry, forbidden)
+    # Open a dialog to edit a name-ipaddr-netmask triple.
+    # @param id    [Integer]    an id for the table item to be returned
+    # @param entry [Yast::Term] an existing entry to be edited, or term(:empty)
+    # @return      [Yast::Term] a table item for OK, nil for Cancel
+    def VirtualEditDialog(id, entry)
       entry = deep_copy(entry)
-      forbidden = deep_copy(forbidden)
       Builtins.y2debug("id=%1", id)
       Builtins.y2debug("entry=%1", entry)
-      Builtins.y2debug("forbidden=%1", forbidden)
 
       UI.OpenDialog(
         Opt(:decorated),
@@ -239,14 +237,12 @@
         UI.SetFocus(Id(:ipaddr))
       end
 
-      host = nil
-      loop do
-        ret = UI.UserInput
-        break if ret != :ok
+      while (ret = UI.UserInput) == :ok
 
         host = Item(Id(id))
         val = UI.QueryWidget(Id(:name), :Value)
-        if Builtins.size(LanItems.device) + Builtins.size(val) + 1 > 
IFACE_LABEL_MAX
+
+        if LanItems.device.size + val.size + 1 > IFACE_LABEL_MAX
           # Popup::Error text
           Popup.Error(_("Label is too long."))
           UI.SetFocus(Id(:name))
@@ -278,6 +274,7 @@
 
       UI.CloseDialog
       return nil if ret != :ok
+
       deep_copy(host)
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.121/test/Makefile.am 
new/yast2-network-3.1.122/test/Makefile.am
--- old/yast2-network-3.1.121/test/Makefile.am  2015-07-02 17:17:43.000000000 
+0200
+++ new/yast2-network-3.1.122/test/Makefile.am  2015-07-23 17:57:12.000000000 
+0200
@@ -1,4 +1,5 @@
 TESTS = \
+  alias_dialog_test.rb \
   bridge_test.rb \
   build_lan_overview_test.rb \
   complex_test.rb \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.121/test/alias_dialog_test.rb 
new/yast2-network-3.1.122/test/alias_dialog_test.rb
--- old/yast2-network-3.1.121/test/alias_dialog_test.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-network-3.1.122/test/alias_dialog_test.rb 2015-07-23 
17:57:12.000000000 +0200
@@ -0,0 +1,44 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper"
+
+require "yast"
+
+class AliasDialog
+  include Yast::I18n
+  include Yast::UIShortcuts
+
+  def initialize
+    Yast.include self, "network/lan/virtual.rb"
+  end
+end
+
+describe "VirtualEditDialog" do
+  # bnc#864264
+  it "passes smoke test" do
+    include Yast::UIShortcuts
+
+    Yast.import "UI"
+    Yast.import "LanItems"
+
+    allow(Yast::UI).to receive(:UserInput).and_return(:ok)
+    allow(Yast::UI)
+      .to receive(:QueryWidget)
+      .and_return("")
+    allow(Yast::UI)
+      .to receive(:QueryWidget)
+      .with(Id(:ipaddr), :Value)
+      .and_return("1.1.1.1")
+    allow(Yast::UI)
+      .to receive(:QueryWidget)
+      .with(Id(:netmask), :Value)
+      .and_return("255.0.0.0")
+    allow(Yast::LanItems).to receive(:device).and_return("")
+
+    expect(Yast::UI).to receive(:UserInput).once
+
+    new_id = 0
+    existing_item = term(:empty)
+    expect(AliasDialog.new.VirtualEditDialog(new_id, existing_item)).not_to be 
nil
+  end
+end


Reply via email to