Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2016-08-22 10:48:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      
2016-08-18 10:20:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2016-08-22 10:48:21.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Aug 18 08:52:41 UTC 2016 - [email protected]
+
+- bnc#991486
+  - extended fix for this bug from 3.1.163. Do not report invalid
+    names incorrectly
+- 3.1.166  
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.CSVcLj/_old  2016-08-22 10:48:22.000000000 +0200
+++ /var/tmp/diff_new_pack.CSVcLj/_new  2016-08-22 10:48:22.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.165
+Version:        3.1.166
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-3.1.165.tar.bz2 -> yast2-network-3.1.166.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.165/CONTRIBUTING.md 
new/yast2-network-3.1.166/CONTRIBUTING.md
--- old/yast2-network-3.1.165/CONTRIBUTING.md   2016-08-15 08:58:35.000000000 
+0200
+++ new/yast2-network-3.1.166/CONTRIBUTING.md   2016-08-19 16:48:53.000000000 
+0200
@@ -3,7 +3,7 @@
 
 YaST is an open source project and as such it welcomes all kinds of
 contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and YaST maintainers.
+ensure the process is effective and pleasant both for you and the YaST 
maintainers.
 
 There are two main forms of contribution: reporting bugs and performing code
 changes.
@@ -17,13 +17,11 @@
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
-that every bug will be fixed, but we'll try.
-
 When creating a bug report, please follow our [bug reporting
 guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
 
+We can't guarantee that every bug will be fixed, but we'll try.
+
 Code Changes
 ------------
 
@@ -44,15 +42,22 @@
      to the [Ruby style
      guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
 
-  4. Make sure your change didn't break anything by building the RPM package
+  4. Update the package version (in `packages/*.spec`, usually by
+     `rake version:bump`) and add a new entry to the `package/*.changes` file
+     (by `osc vc package`).  
+     For bigger changes or changes which need longer discussion it is advised 
to
+     add this as a separate last commit so it can be easily updated when 
another
+     change is merged in the meantime.
+
+  5. Make sure your change didn't break anything by building the RPM package
      (`rake osc:build`). The build process includes running the full testsuite.
 
-  5. Publish the branch and create a pull request.
+  6. Publish the branch and create a pull request.
 
-  6. YaST developers will review your change and possibly point out issues.
+  7. YaST developers will review your change and possibly point out issues.
      Adapt the code under their guidance until they are all resolved.
 
-  7. Finally, the pull request will get merged or rejected.
+  8. Finally, the pull request will get merged or rejected.
 
 See also [GitHub's guide on
 contributing](https://help.github.com/articles/fork-a-repo).
@@ -60,9 +65,6 @@
 If you want to do multiple unrelated changes, use separate branches and pull
 requests.
 
-Do not change the `VERSION` and `*.changes` files as this could lead to
-conflicts.
-
 ### Commits
 
 Each commit in the pull request should do only one thing, which is clearly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.165/package/yast2-network.changes 
new/yast2-network-3.1.166/package/yast2-network.changes
--- old/yast2-network-3.1.165/package/yast2-network.changes     2016-08-15 
08:58:35.000000000 +0200
+++ new/yast2-network-3.1.166/package/yast2-network.changes     2016-08-19 
16:48:53.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Thu Aug 18 08:52:41 UTC 2016 - [email protected]
+
+- bnc#991486
+  - extended fix for this bug from 3.1.163. Do not report invalid
+    names incorrectly
+- 3.1.166  
+
+-------------------------------------------------------------------
 Thu Aug 11 19:02:36 UTC 2016 - [email protected]
 
 - bnc#985905 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.165/package/yast2-network.spec 
new/yast2-network-3.1.166/package/yast2-network.spec
--- old/yast2-network-3.1.165/package/yast2-network.spec        2016-08-15 
08:58:35.000000000 +0200
+++ new/yast2-network-3.1.166/package/yast2-network.spec        2016-08-19 
16:48:53.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.165
+Version:        3.1.166
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.1.165/src/include/network/lan/address.rb 
new/yast2-network-3.1.166/src/include/network/lan/address.rb
--- old/yast2-network-3.1.165/src/include/network/lan/address.rb        
2016-08-15 08:58:35.000000000 +0200
+++ new/yast2-network-3.1.166/src/include/network/lan/address.rb        
2016-08-19 16:48:53.000000000 +0200
@@ -393,7 +393,7 @@
       Ops.set(
         @widget_descr_local,
         "HWDIALOG",
-        Ops.get(@widget_descr_hardware, "HWDIALOG", {})
+        Ops.get(widget_descr_hardware, "HWDIALOG", {})
       )
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.1.165/src/include/network/lan/hardware.rb 
new/yast2-network-3.1.166/src/include/network/lan/hardware.rb
--- old/yast2-network-3.1.165/src/include/network/lan/hardware.rb       
2016-08-15 08:58:35.000000000 +0200
+++ new/yast2-network-3.1.166/src/include/network/lan/hardware.rb       
2016-08-19 16:48:53.000000000 +0200
@@ -51,19 +51,26 @@
       Yast.include include_target, "network/lan/cards.rb"
 
       @hardware = nil
+    end
 
-      @widget_descr_hardware = {
-        "HWDIALOG" => {
-          "widget"            => :custom,
-          "custom_widget"     => ReplacePoint(Id(:hw_content), Empty()),
-          "init"              => fun_ref(method(:initHwDialog), "void 
(string)"),
-          "handle"            => fun_ref(method(:handleHW), "symbol (string, 
map)"),
-          "store"             => fun_ref(method(:storeHW), "void (string, 
map)"),
-          "validate_type"     => :function,
-          "validate_function" => fun_ref(method(:validate_hw), "boolean 
(string, map)"),
-          "help"              => initHelp
-        }
+    def widget_descr_hardware
+      widget_descr = {
+        "widget"        => :custom,
+        "custom_widget" => ReplacePoint(Id(:hw_content), Empty()),
+        "init"          => fun_ref(method(:initHwDialog), "void (string)"),
+        "handle"        => fun_ref(method(:handleHW), "symbol (string, map)"),
+        "store"         => fun_ref(method(:storeHW), "void (string, map)"),
+        "help"          => initHelp
       }
+
+      # validation function currently checks user's input in :ifcfg_name widget
+      # However this widget is present only when adding new device
+      if isNewDevice
+        widget_descr["validate_type"] = :function
+        widget_descr["validate_function"] = fun_ref(method(:validate_hw), 
"boolean (string, map)")
+      end
+
+      { "HWDIALOG" => widget_descr }
     end
 
     # Determines if the dialog is used for adding new device or for editing 
existing one.
@@ -1238,7 +1245,7 @@
     def HardwareDialog
       caption = _("Hardware Dialog")
 
-      w = CWM.CreateWidgets(["HWDIALOG"], @widget_descr_hardware)
+      w = CWM.CreateWidgets(["HWDIALOG"], widget_descr_hardware)
       contents = VBox(
         VStretch(),
         HBox(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.165/test/hardware_test.rb 
new/yast2-network-3.1.166/test/hardware_test.rb
--- old/yast2-network-3.1.165/test/hardware_test.rb     2016-08-15 
08:58:35.000000000 +0200
+++ new/yast2-network-3.1.166/test/hardware_test.rb     2016-08-19 
16:48:53.000000000 +0200
@@ -42,3 +42,25 @@
     expect(subject.validate_hw(nil, nil)).to be false
   end
 end
+
+describe "#widget_descr_hardware" do
+  subject { HardwareTestClass.new }
+
+  it "sets validation function when invoked for adding device" do
+    allow(subject).to receive(:isNewDevice).and_return(true)
+
+    ret = subject.widget_descr_hardware
+
+    expect(ret["HWDIALOG"]).to have_key("validate_type")
+    expect(ret["HWDIALOG"]).to have_key("validate_function")
+  end
+
+  it "doesn't set validation function when invoked for editing device" do
+    allow(subject).to receive(:isNewDevice).and_return(false)
+
+    ret = subject.widget_descr_hardware
+
+    expect(ret["HWDIALOG"]).not_to have_key("validate_type")
+    expect(ret["HWDIALOG"]).not_to have_key("validate_function")
+  end
+end


Reply via email to