Hello community,

here is the log from the commit of package yast2-ntp-client for 
openSUSE:Factory checked in at 2020-03-22 14:16:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ntp-client.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ntp-client"

Sun Mar 22 14:16:19 2020 rev:120 rq:786519 version:4.2.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes        
2020-03-14 09:54:41.587081629 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-ntp-client.new.3160/yast2-ntp-client.changes  
    2020-03-22 14:16:22.098025943 +0100
@@ -1,0 +2,8 @@
+Wed Mar 18 15:44:25 CET 2020 - sch...@suse.de
+
+- NTP-server-configuration/Time-setting-module in a running
+  system: Do not show check-boxes for saving configuration and
+  starting the deamon (follow up of bsc#1164547).
+- 4.2.10
+
+-------------------------------------------------------------------

Old:
----
  yast2-ntp-client-4.2.9.tar.bz2

New:
----
  yast2-ntp-client-4.2.10.tar.bz2

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

Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.tGXgMI/_old  2020-03-22 14:16:23.242026677 +0100
+++ /var/tmp/diff_new_pack.tGXgMI/_new  2020-03-22 14:16:23.246026680 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        4.2.9
+Version:        4.2.10
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0-or-later

++++++ yast2-ntp-client-4.2.9.tar.bz2 -> yast2-ntp-client-4.2.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.2.9/package/yast2-ntp-client.changes 
new/yast2-ntp-client-4.2.10/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-4.2.9/package/yast2-ntp-client.changes 2020-03-09 
17:00:02.000000000 +0100
+++ new/yast2-ntp-client-4.2.10/package/yast2-ntp-client.changes        
2020-03-19 17:12:16.000000000 +0100
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Wed Mar 18 15:44:25 CET 2020 - sch...@suse.de
+
+- NTP-server-configuration/Time-setting-module in a running
+  system: Do not show check-boxes for saving configuration and
+  starting the deamon (follow up of bsc#1164547).
+- 4.2.10
+
+-------------------------------------------------------------------
 Tue Mar  3 16:38:54 CET 2020 - sch...@suse.de
 
 - Supporting more than one ntp server in the time setting module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-4.2.9/package/yast2-ntp-client.spec 
new/yast2-ntp-client-4.2.10/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-4.2.9/package/yast2-ntp-client.spec    2020-03-09 
17:00:02.000000000 +0100
+++ new/yast2-ntp-client-4.2.10/package/yast2-ntp-client.spec   2020-03-19 
17:12:16.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        4.2.9
+Version:        4.2.10
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.2.9/src/clients/ntp-client_proposal.rb 
new/yast2-ntp-client-4.2.10/src/clients/ntp-client_proposal.rb
--- old/yast2-ntp-client-4.2.9/src/clients/ntp-client_proposal.rb       
2020-03-09 17:00:02.000000000 +0100
+++ new/yast2-ntp-client-4.2.10/src/clients/ntp-client_proposal.rb      
2020-03-19 17:12:16.000000000 +0100
@@ -87,58 +87,49 @@
     end
 
     def ui_help_text
-      # help text
-      tmp = _(
-        "<p>Press <b>Synchronize Now</b>, to get your system time set 
correctly " \
-        "using the selected NTP server. If you want to make use of NTP 
permanently, " \
-        "enable the <b>Save NTP Configuration</b> option</p>"
-      )
-
-      tmp = Ops.add(
-        tmp,
+      if Stage.initial
+        # help text
         _(
+          "<p>Press <b>Synchronize Now</b>, to get your system time set 
correctly " \
+          "using the selected NTP server. If you want to make use of NTP 
permanently, " \
+          "enable the <b>Save NTP Configuration</b> option</p>"
+        ) + _(
           "<p>Enabling <b>Run NTP as daemon</b> option, the NTP service will 
be " \
           "started as daemon. Otherwise the system time will be synchronized 
periodically. " \
           "The default interval is 15 min. You can change it after 
installation " \
           "with the <b>yast2 ntp-client module</b>.</p>"
-        )
-      )
-
-      # help text, cont.
-      if !Stage.initial
-        tmp = Ops.add(
-          tmp,
-          _(
-            "<p>Using the <b>Configure</b> button, open the advanced NTP 
configuration.</p>"
-          )
-        )
-      end
-
-      # help text, cont.
-      tmp = Ops.add(
-        tmp,
-        _(
+        ) + _(
           "<p>Synchronization with the NTP server can be done only when " \
           "the network is configured.</p>"
         )
-      )
-      tmp
+      else
+        # help text
+        _(
+          "<p>Using the <b>Configure</b> button, open the advanced NTP 
configuration.</p>"
+        )
+      end
     end
 
     def ui_enable_disable_widgets(enabled)
       UI.ChangeWidget(Id(:ntp_address), :Enabled, enabled) if select_ntp_server
-      UI.ChangeWidget(Id(:run_service), :Enabled, enabled)
-      # FIXME: With chronyd, we cannot synchronize if the service is already
-      # running, we could force a makestep in this case, but then the button
-      # should be reworded and maybe the user should confirm it (bsc#1087048)
-      if !NetworkService.isNetworkRunning || 
Service.Active(NtpClient.service_name)
-        UI.ChangeWidget(Id(:ntp_now), :Enabled, false)
-      else
-        UI.ChangeWidget(Id(:ntp_now), :Enabled, enabled)
+
+      if Stage.initial
+        UI.ChangeWidget(Id(:run_service), :Enabled, enabled)
+
+        # FIXME: With chronyd, we cannot synchronize if the service is already
+        # running, we could force a makestep in this case, but then the button
+        # should be reworded and maybe the user should confirm it (bsc#1087048)
+        if !NetworkService.isNetworkRunning || 
Service.Active(NtpClient.service_name)
+          UI.ChangeWidget(Id(:ntp_now), :Enabled, false)
+        else
+          UI.ChangeWidget(Id(:ntp_now), :Enabled, enabled)
+        end
+        UI.ChangeWidget(Id(:ntp_save), :Enabled, enabled)
+      end
+      if UI.WidgetExists(Id(:ntp_configure))
+        # bnc#483787
+        UI.ChangeWidget(Id(:ntp_configure), :Enabled, enabled)
       end
-      UI.ChangeWidget(Id(:ntp_save), :Enabled, enabled)
-      # bnc#483787
-      UI.ChangeWidget(Id(:ntp_configure), :Enabled, enabled) if 
UI.WidgetExists(Id(:ntp_configure))
 
       nil
     end
@@ -190,6 +181,10 @@
 
         log.info "ntp_items :#{ntp_items}"
         UI.ChangeWidget(Id(:ntp_address), :Items, ntp_items)
+        if !Stage.initial
+          UI.ChangeWidget(Id(:ntp_address), :Value,
+            NtpClient.GetUsedNtpServers.first)
+        end
       end
 
       nil
@@ -222,6 +217,36 @@
         ntp_server_widget = Label(text)
       end
 
+      if Stage.initial
+        # TRANSLATORS: push button label
+        ntp_server_action_widget = Left(PushButton(Id(:ntp_now), 
_("S&ynchronize now")))
+        save_run_widget = VBox(
+          HBox(
+            HSpacing(0.5),
+            # TRANSLATORS: check box label
+            Left(
+              CheckBox(
+                Id(:run_service),
+                _("&Run NTP as daemon"),
+                NtpClient.run_service
+              )
+            )
+          ),
+          HBox(
+            HSpacing(0.5),
+            # TRANSLATORS: check box label
+            Left(
+              CheckBox(Id(:ntp_save), _("&Save NTP Configuration"), true)
+            )
+          )
+        )
+      else
+        # TRANSLATORS: push button label
+        # bnc#449615: only simple config for inst-sys
+        ntp_server_action_widget = Left(PushButton(Id(:ntp_configure), 
_("&Configure...")))
+        save_run_widget = VBox()
+      end
+
       cont = VBox(
         VSpacing(0.5),
         HBox(
@@ -239,8 +264,7 @@
               # an explicit vertical space was added in order to move down the
               # push button being aligned with the combo box input.
               UI.TextMode ? VSpacing(1) : Label(""),
-              # TRANSLATORS: push button label
-              Left(PushButton(Id(:ntp_now), _("S&ynchronize now")))
+              ntp_server_action_widget
             )
           )
         ),
@@ -248,49 +272,23 @@
           HSpacing(3),
           HWeight(
             1,
-            VBox(
-              HBox(
-                HSpacing(0.5),
-                # TRANSLATORS: check box label
-                Left(
-                  CheckBox(
-                    Id(:run_service),
-                    _("&Run NTP as daemon"),
-                    NtpClient.run_service
-                  )
-                )
-              ),
-              HBox(
-                HSpacing(0.5),
-                # TRANSLATORS: check box label
-                Left(
-                  CheckBox(Id(:ntp_save), _("&Save NTP Configuration"), true)
-                )
-              )
-            )
-          ),
-          HWeight(
-            1,
-            VBox(
-              # TRANSLATORS: push button label
-              # bnc#449615: only simple config for inst-sys
-              Stage.initial ? Label("") : Left(PushButton(Id(:ntp_configure), 
_("&Configure..."))),
-              Label("")
-            )
+            save_run_widget
           )
         )
       )
 
       UI.ReplaceWidget(replace_point, cont)
 
-      UI.ChangeWidget(Id(:ntp_now), :Enabled, false) if 
!NetworkService.isNetworkRunning
+      if Stage.initial && !NetworkService.isNetworkRunning
+        UI.ChangeWidget(Id(:ntp_now), :Enabled, false)
+      end
 
       # ^ createui0
 
       # FIXME: is it correct? move out?
       ntp_used = (first_time && !Stage.initial) ? GetNTPEnabled() : 
NtpClient.ntp_selected
 
-      UI.ChangeWidget(Id(:ntp_save), :Value, ntp_used)
+      UI.ChangeWidget(Id(:ntp_save), :Value, ntp_used) if Stage.initial
 
       MakeProposal()
       ntp_used
@@ -422,8 +420,11 @@
         elsif rv == :next && !Stage.initial
           # Updating UI for the changed ntp servers
           ui_init(Id(:rp), false)
-          # show the 'save' status after configuration
-          UI.ChangeWidget(Id(:ntp_save), :Value, GetNTPEnabled())
+
+          if Stage.initial
+            # show the 'save' status after configuration
+            UI.ChangeWidget(Id(:ntp_save), :Value, GetNTPEnabled())
+          end
         end
       when :ntp_now
         rv = Write("ntpdate_only" => true)
@@ -454,9 +455,11 @@
     def ui_try_save
       argmap = {}
       Ops.set(argmap, "ntpdate_only", false)
-      Ops.set(argmap, "run_service", false)
-      Ops.set(argmap, "ntpdate_only", true) if UI.QueryWidget(Id(:ntp_save), 
:Value) == false
-      Ops.set(argmap, "run_service", true) if UI.QueryWidget(Id(:run_service), 
:Value) == true
+      Ops.set(argmap, "run_service", NtpClient.run_service)
+      if Stage.initial
+        Ops.set(argmap, "ntpdate_only", true) if UI.QueryWidget(Id(:ntp_save), 
:Value) == false
+        Ops.set(argmap, "run_service", true) if 
UI.QueryWidget(Id(:run_service), :Value)
+      end
 
       rv = Write(argmap)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.2.9/test/ntp_client_proposal_test.rb 
new/yast2-ntp-client-4.2.10/test/ntp_client_proposal_test.rb
--- old/yast2-ntp-client-4.2.9/test/ntp_client_proposal_test.rb 2020-03-09 
17:00:02.000000000 +0100
+++ new/yast2-ntp-client-4.2.10/test/ntp_client_proposal_test.rb        
2020-03-19 17:12:16.000000000 +0100
@@ -32,6 +32,7 @@
       allow(Yast::NtpClient).to receive(:GetUsedNtpServers)
         .and_return(["de.pool.ntp.org"])
       allow(subject).to receive(:select_ntp_server).and_return(true)
+      allow(Yast::Stage).to receive(:initial).and_return(true)
     end
 
     context "when NTP servers were found via DHCP" do


Reply via email to