Hello community,

here is the log from the commit of package yast2-ntp-client for 
openSUSE:Factory checked in at 2018-04-26 13:29:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ntp-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ntp-client"

Thu Apr 26 13:29:31 2018 rev:105 rq:598034 version:4.0.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes        
2018-03-26 12:15:09.288825318 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ntp-client.new/yast2-ntp-client.changes   
2018-04-26 13:29:33.302714465 +0200
@@ -1,0 +2,14 @@
+Thu Apr 19 08:56:08 CEST 2018 - [email protected]
+
+- Fix in checking installed chrony package while writing ntp
+  settings. (bnc#1089962)
+- 4.0.12
+
+-------------------------------------------------------------------
+Fri Apr 13 10:34:33 CEST 2018 - [email protected]
+
+- Improved robustness if chrony has not been installed.
+  (bnc#1072345, bnc#1061035)
+- 4.0.11
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.SW1kBc/_old  2018-04-26 13:29:33.874693515 +0200
+++ /var/tmp/diff_new_pack.SW1kBc/_new  2018-04-26 13:29:33.878693369 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        4.0.10
+Version:        4.0.12
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0+

++++++ yast2-ntp-client-4.0.10.tar.bz2 -> yast2-ntp-client-4.0.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.changes 
new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.changes        
2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.changes        
2018-04-19 09:40:05.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Apr 19 08:56:08 CEST 2018 - [email protected]
+
+- Fix in checking installed chrony package while writing ntp
+  settings. (bnc#1089962)
+- 4.0.12
+
+-------------------------------------------------------------------
+Fri Apr 13 10:34:33 CEST 2018 - [email protected]
+
+- Improved robustness if chrony has not been installed.
+  (bnc#1072345, bnc#1061035)
+- 4.0.11
+
+-------------------------------------------------------------------
 Thu Mar 22 08:16:37 UTC 2018 - [email protected]
 
 - Permitted the use of 'listentry' element or 'ntp_server' and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.spec 
new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-4.0.10/package/yast2-ntp-client.spec   2018-03-22 
09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/package/yast2-ntp-client.spec   2018-04-19 
09:40:05.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        4.0.10
+Version:        4.0.12
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.0.10/src/clients/ntp-client_proposal.rb 
new/yast2-ntp-client-4.0.12/src/clients/ntp-client_proposal.rb
--- old/yast2-ntp-client-4.0.10/src/clients/ntp-client_proposal.rb      
2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/clients/ntp-client_proposal.rb      
2018-04-19 09:40:05.000000000 +0200
@@ -19,6 +19,7 @@
       Yast.import "String"
       Yast.import "Stage"
       Yast.import "PackageSystem"
+      Yast.import "Pkg"
       Yast.import "Popup"
       Yast.import "Progress"
       Yast.import "Report"
@@ -348,20 +349,18 @@
       WriteNtpSettings(ntp_servers, ntp_server, run_service)
       return :success if param["write_only"]
 
-      required_package = "chrony"
-
       # In 1st stage, schedule packages for installation
       if Stage.initial
         Yast.import "Packages"
-        Packages.addAdditionalPackage(required_package)
+        Packages.addAdditionalPackage(NtpClientClass::REQUIRED_PACKAGE)
       # Otherwise, prompt user for confirming pkg installation
-      elsif !PackageSystem.CheckAndInstallPackages([required_package])
+      elsif 
!PackageSystem.CheckAndInstallPackages([NtpClientClass::REQUIRED_PACKAGE])
         Report.Error(
           Builtins.sformat(
             _(
               "Synchronization with NTP server is not possible\nwithout 
package %1 installed."
             ),
-            required_package
+            NtpClientClass::REQUIRED_PACKAGE
           )
         )
       end
@@ -406,6 +405,19 @@
           Report.Error(_("Connection to selected NTP server failed."))
         end
       end
+      if ui == :accept && Stage.initial
+        # checking if chrony is available for installation.
+        if UI.QueryWidget(Id(:ntp_save), :Value) == true &&
+            !Pkg.IsAvailable(NtpClientClass::REQUIRED_PACKAGE)
+          Report.Error(Builtins.sformat(
+            # TRANSLATORS: Popup message. %1 is the missing package name.
+            _("Cannot save NTP configuration because the package %1 is not 
available."),
+            NtpClientClass::REQUIRED_PACKAGE
+          ))
+          UI.ChangeWidget(Id(:ntp_save), :Value, false)
+          redraw = true
+        end
+      end
 
       redraw ? :redraw : nil
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-4.0.10/src/lib/y2ntp_client/client/finish.rb 
new/yast2-ntp-client-4.0.12/src/lib/y2ntp_client/client/finish.rb
--- old/yast2-ntp-client-4.0.10/src/lib/y2ntp_client/client/finish.rb   
2018-03-22 09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/lib/y2ntp_client/client/finish.rb   
2018-04-19 09:40:05.000000000 +0200
@@ -4,6 +4,7 @@
 require "installation/finish_client"
 
 Yast.import "NtpClient"
+Yast.import "Package"
 
 module Y2NtpClient
   module Client
@@ -24,6 +25,17 @@
       end
 
       def write
+        unless Package.Installed(NtpClientClass::REQUIRED_PACKAGE)
+          # Not using Pkg.PkgInstalled because it is not working correctly 
here.
+          # (bnc#1089962)
+          Report.Error(Builtins.sformat(
+            # TRANSLATORS: Popup message. %1 is the missing package name.
+            _("Cannot save NTP configuration because the package %1 is not 
installed."),
+            NtpClientClass::REQUIRED_PACKAGE
+          ))
+          return false
+        end
+
         # bnc#449615, must merge the configs which Export/Import fails to do.
         # User config from installation time:
         # fortunately so far we only have the server address(es)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-4.0.10/src/modules/NtpClient.rb 
new/yast2-ntp-client-4.0.12/src/modules/NtpClient.rb
--- old/yast2-ntp-client-4.0.10/src/modules/NtpClient.rb        2018-03-22 
09:46:35.000000000 +0100
+++ new/yast2-ntp-client-4.0.12/src/modules/NtpClient.rb        2018-04-19 
09:40:05.000000000 +0200
@@ -48,6 +48,9 @@
       "synchronize_time"
     ].freeze
 
+    # Package which is needed for saving NTP configuration into system
+    REQUIRED_PACKAGE = "chrony".freeze
+
     def main
       textdomain "ntp-client"
 
@@ -100,7 +103,7 @@
       @ad_controller = ""
 
       # Required packages
-      @required_packages = ["chrony"]
+      @required_packages = [REQUIRED_PACKAGE]
 
       # List of known NTP servers
       # server address -> information


Reply via email to