Hello community,

here is the log from the commit of package yast2-registration for 
openSUSE:Factory checked in at 2019-03-04 09:15:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-registration.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-registration"

Mon Mar  4 09:15:41 2019 rev:33 rq:680487 version:4.1.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes    
2019-02-28 21:48:50.633385700 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-registration.new.28833/yast2-registration.changes
 2019-03-04 09:15:46.412650665 +0100
@@ -1,0 +2,7 @@
+Fri Mar  1 09:50:20 UTC 2019 - [email protected]
+
+- Skip SLP discovery when going back after registering the system,
+  the server cannot be changed anyway (related to bsc#1071887)
+- 4.1.19
+
+-------------------------------------------------------------------

Old:
----
  yast2-registration-4.1.18.tar.bz2

New:
----
  yast2-registration-4.1.19.tar.bz2

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

Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.KbBAfT/_old  2019-03-04 09:15:47.040650552 +0100
+++ /var/tmp/diff_new_pack.KbBAfT/_new  2019-03-04 09:15:47.044650551 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.1.18
+Version:        4.1.19
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-registration-4.1.18.tar.bz2 -> yast2-registration-4.1.19.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.1.18/package/yast2-registration.changes 
new/yast2-registration-4.1.19/package/yast2-registration.changes
--- old/yast2-registration-4.1.18/package/yast2-registration.changes    
2019-02-28 15:18:50.000000000 +0100
+++ new/yast2-registration-4.1.19/package/yast2-registration.changes    
2019-03-01 13:40:15.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Mar  1 09:50:20 UTC 2019 - [email protected]
+
+- Skip SLP discovery when going back after registering the system,
+  the server cannot be changed anyway (related to bsc#1071887)
+- 4.1.19
+
+-------------------------------------------------------------------
 Mon Feb 25 12:32:35 UTC 2019 - [email protected]
 
 - Better handle the SSL certificates signed by an uknown CA
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.1.18/package/yast2-registration.spec 
new/yast2-registration-4.1.19/package/yast2-registration.spec
--- old/yast2-registration-4.1.18/package/yast2-registration.spec       
2019-02-28 15:18:50.000000000 +0100
+++ new/yast2-registration-4.1.19/package/yast2-registration.spec       
2019-03-01 13:40:15.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-registration
-Version:        4.1.18
+Version:        4.1.19
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.1.18/src/lib/registration/ui/base_system_registration_dialog.rb
 
new/yast2-registration-4.1.19/src/lib/registration/ui/base_system_registration_dialog.rb
--- 
old/yast2-registration-4.1.18/src/lib/registration/ui/base_system_registration_dialog.rb
    2019-02-28 15:18:50.000000000 +0100
+++ 
new/yast2-registration-4.1.19/src/lib/registration/ui/base_system_registration_dialog.rb
    2019-03-01 13:40:15.000000000 +0100
@@ -288,15 +288,6 @@
       #
       # @return [Yast::Term] UI terms
       def register_local_option
-        # If not special URL is used, probe with SLP
-        if using_default_url?
-          services = UrlHelpers.slp_discovery_feedback
-          urls = services.map { |svc| UrlHelpers.service_url(svc.slp_url) }
-          urls = [EXAMPLE_SMT_URL] if urls.empty?
-        else
-          urls = [reg_options[:custom_url]]
-        end
-
         VBox(
           Left(
             RadioButton(
@@ -314,7 +305,7 @@
               VBox(
                 MinWidth(REG_CODE_WIDTH,
                   ComboBox(Id(:custom_url), Opt(:editable),
-                    _("&Local Registration Server URL"), urls))
+                    _("&Local Registration Server URL"), 
local_registration_urls))
               )
             )
           ),
@@ -557,6 +548,19 @@
         reg_options[:custom_url] == default_url
       end
 
+      #
+      # Scan the network for SLP registration servers
+      #
+      # @return [Array<String>] The list of found URLs
+      #
+      def slp_urls
+        # do not scan again if the system has been registered during 
installation
+        # (the user is going back)
+        return [] if Registration.is_registered? && !Yast::Mode.normal
+        services = UrlHelpers.slp_discovery_feedback
+        services.map { |svc| UrlHelpers.service_url(svc.slp_url) }
+      end
+
       # This method check whether the input is valid
       #
       # It relies on methods "validate_#!{action}".
@@ -613,6 +617,21 @@
       rescue URI::InvalidURIError
         false
       end
+
+      #
+      # List of offered local registration servers
+      #
+      # @return [Array<String>] List of URLs, contains an example URL
+      #  if no local registration server was found
+      #
+      def local_registration_urls
+        # If no special URL is used, probe with SLP
+        return [reg_options[:custom_url]] unless using_default_url?
+
+        # use an example URL if no server was found via SLP
+        urls = slp_urls
+        urls.empty? ? [EXAMPLE_SMT_URL] : urls
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-registration-4.1.18/test/base_system_registration_dialog_test.rb 
new/yast2-registration-4.1.19/test/base_system_registration_dialog_test.rb
--- old/yast2-registration-4.1.18/test/base_system_registration_dialog_test.rb  
2019-02-28 15:18:50.000000000 +0100
+++ new/yast2-registration-4.1.19/test/base_system_registration_dialog_test.rb  
2019-03-01 13:40:15.000000000 +0100
@@ -220,11 +220,19 @@
     context "when system is already registered" do
       let(:registered?) { true }
 
+      before do
+        allow(subject).to receive(:event_loop).and_return(nil)
+      end
+
       context "in installation mode" do
         it "disables widgets" do
           expect(Yast::UI).to receive(:ChangeWidget).with(Id(:action), 
:Enabled, false)
           allow(Yast::UI).to receive(:ChangeWidget).and_call_original
-          allow(subject).to receive(:event_loop).and_return(nil)
+          subject.run
+        end
+
+        it "skips the SLP discovery" do
+          expect(Registration::UrlHelpers).to_not 
receive(:slp_discovery_feedback)
           subject.run
         end
       end


Reply via email to