Skip to content

Commit

Permalink
using Package class for checking installed chrony package (#112)
Browse files Browse the repository at this point in the history
* using Package class for checking installed chrony package
  • Loading branch information
schubi2 committed Apr 19, 2018
1 parent 39ea859 commit 48e72b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/yast2-ntp-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Apr 19 08:56:08 CEST 2018 - schubi@suse.de

- Fix in checking installed chrony package while writing ntp
settings. (bnc#1089962)
- 4.0.12

-------------------------------------------------------------------
Fri Apr 13 10:34:33 CEST 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-ntp-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-ntp-client
Version: 4.0.11
Version: 4.0.12
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0+
Expand Down
6 changes: 4 additions & 2 deletions src/lib/y2ntp_client/client/finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "installation/finish_client"

Yast.import "NtpClient"
Yast.import "Pkg"
Yast.import "Package"

module Y2NtpClient
module Client
Expand All @@ -25,7 +25,9 @@ def modes
end

def write
unless Pkg.PkgInstalled(NtpClientClass::REQUIRED_PACKAGE)
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."),
Expand Down

0 comments on commit 48e72b6

Please sign in to comment.