Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2022-06-10 15:57:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Fri Jun 10 15:57:17 2022 rev:482 rq:981441 version:4.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2022-05-22 20:25:59.842137789 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new.1548/yast2-network.changes    
2022-06-10 15:57:23.488810195 +0200
@@ -1,0 +2,6 @@
+Tue Jun  7 13:30:22 UTC 2022 - Martin Vidner <mvid...@suse.com>
+
+- Allow more than 6 domains in resolver search list (bsc#1200155).
+- 4.5.3
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.f9oQJV/_old  2022-06-10 15:57:24.104810941 +0200
+++ /var/tmp/diff_new_pack.f9oQJV/_new  2022-06-10 15:57:24.108810946 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.5.2
+Version:        4.5.3
 Release:        0
 Summary:        YaST2 - Network Configuration
 License:        GPL-2.0-only

++++++ yast2-network-4.5.2.tar.bz2 -> yast2-network-4.5.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.2/package/yast2-network.changes 
new/yast2-network-4.5.3/package/yast2-network.changes
--- old/yast2-network-4.5.2/package/yast2-network.changes       2022-05-19 
19:24:34.000000000 +0200
+++ new/yast2-network-4.5.3/package/yast2-network.changes       2022-06-09 
08:41:28.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Tue Jun  7 13:30:22 UTC 2022 - Martin Vidner <mvid...@suse.com>
+
+- Allow more than 6 domains in resolver search list (bsc#1200155).
+- 4.5.3
+
+-------------------------------------------------------------------
 Wed May 18 19:49:34 UTC 2022 - Knut Anderssen <kanders...@suse.com>
 
 - CFA NM: replace problematic characters when getting the filename
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.2/package/yast2-network.spec 
new/yast2-network-4.5.3/package/yast2-network.spec
--- old/yast2-network-4.5.2/package/yast2-network.spec  2022-05-19 
19:24:34.000000000 +0200
+++ new/yast2-network-4.5.3/package/yast2-network.spec  2022-06-09 
08:41:28.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.5.2
+Version:        4.5.3
 Release:        0
 Summary:        YaST2 - Network Configuration
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.5.2/src/include/network/services/dns.rb 
new/yast2-network-4.5.3/src/include/network/services/dns.rb
--- old/yast2-network-4.5.2/src/include/network/services/dns.rb 2022-05-19 
19:24:34.000000000 +0200
+++ new/yast2-network-4.5.3/src/include/network/services/dns.rb 2022-06-09 
08:41:28.000000000 +0200
@@ -498,31 +498,13 @@
       sl = NonEmpty(Builtins.splitstring(value, " ,\n\t"))
       error = ""
 
-      if Ops.greater_than(Builtins.size(sl), 6)
-        # Popup::Error text
-        error = Builtins.sformat(
-          _("The search list can have at most %1 domains."),
-          6
-        )
-      elsif Ops.greater_than(Builtins.size(Builtins.mergestring(sl, " ")), 256)
-        # Popup::Error text
-        error = Builtins.sformat(
-          _("The search list can have at most %1 characters."),
-          256
-        )
-      end
-      Builtins.foreach(sl) do |s|
-        if !Hostname.CheckDomain(s)
-          # Popup::Error text
-          error = Ops.add(
-            Ops.add(
-              Builtins.sformat(_("The search domain '%1' is invalid."), s),
-              "\n"
-            ),
-            Hostname.ValidDomain
-          )
-          break
-        end
+      sl.each do |s|
+        next if Hostname.CheckDomain(s)
+
+        # TRANSLATORS: Popup::Error text
+        error = Builtins.sformat(_("The search domain '%1' is invalid."), s) +
+          "\n" + Hostname.ValidDomain
+        break
       end
 
       if error != ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.2/test/dns_service_test.rb 
new/yast2-network-4.5.3/test/dns_service_test.rb
--- old/yast2-network-4.5.2/test/dns_service_test.rb    2022-05-19 
19:24:34.000000000 +0200
+++ new/yast2-network-4.5.3/test/dns_service_test.rb    2022-06-09 
08:41:28.000000000 +0200
@@ -84,6 +84,54 @@
     end
   end
 
+  describe "#ValidateSearchList" do
+    let(:widget_id) { "something" }
+    let(:ui_event) { {} }
+
+    it "allows empty value" do
+      expect(Yast::UI).to receive(:QueryWidget).with(Id(widget_id), 
:Value).and_return("")
+
+      expect(Yast::UI).to_not receive(:SetFocus)
+      expect(Yast::Popup).to_not receive(:Error)
+
+      expect(subject.ValidateSearchList(widget_id, ui_event)).to be true
+    end
+
+    it "allows valid values" do
+      sl = "foo.example.com, example.org \n example.net \t example.not"
+      expect(Yast::UI).to receive(:QueryWidget).with(Id(widget_id), 
:Value).and_return(sl)
+      expect(Yast::Hostname).to 
receive(:CheckDomain).exactly(4).times.and_call_original
+
+      expect(Yast::UI).to_not receive(:SetFocus)
+      expect(Yast::Popup).to_not receive(:Error)
+
+      expect(subject.ValidateSearchList(widget_id, ui_event)).to be true
+    end
+
+    it "allows a long list (256+) with many (6+) values" do
+      ooo = "o" * 60
+      long = "l#{ooo}ng.com"
+      sl = "a.#{long} b.#{long} c.#{long} d.#{long} e.#{long} f.#{long} 
g.#{long}"
+      expect(Yast::UI).to receive(:QueryWidget).with(Id(widget_id), 
:Value).and_return(sl)
+
+      expect(Yast::UI).to_not receive(:SetFocus)
+      expect(Yast::Popup).to_not receive(:Error)
+
+      expect(subject.ValidateSearchList(widget_id, ui_event)).to be true
+    end
+
+    it "reports the first invalid value" do
+      sl = "/.example.com /.example.org \n example.net \t example.not"
+      expect(Yast::UI).to receive(:QueryWidget).with(Id(widget_id), 
:Value).and_return(sl)
+
+      expect(Yast::UI).to receive(:SetFocus)
+      err = /The search domain '\/.example.com' is invalid.\nA valid domain 
name.*/
+      expect(Yast::Popup).to receive(:Error).with(err)
+
+      expect(subject.ValidateSearchList(widget_id, ui_event)).to be false
+    end
+  end
+
   xdescribe "#propose_hostname_for" do
 
   end

Reply via email to