Hello community,

here is the log from the commit of package yast2-ntp-client for 
openSUSE:Factory checked in at 2017-07-17 10:31:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ntp-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ntp-client"

Mon Jul 17 10:31:38 2017 rev:97 rq:510379 version:3.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes        
2017-07-10 11:00:24.355426690 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ntp-client.new/yast2-ntp-client.changes   
2017-07-17 10:31:39.495447047 +0200
@@ -1,0 +2,9 @@
+Thu Jul 13 14:23:11 UTC 2017 - jreidin...@suse.com
+
+- fix crash when restrict entry in autoyast have empty value
+  (bsc#1043370)
+- fix wrong export for trustedkey config entry
+  (bsc#1043370)
+- 3.3.2
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.AjWY6a/_old  2017-07-17 10:31:40.231343298 +0200
+++ /var/tmp/diff_new_pack.AjWY6a/_new  2017-07-17 10:31:40.235342734 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        3.3.1
+Version:        3.3.2
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0+

++++++ yast2-ntp-client-3.3.1.tar.bz2 -> yast2-ntp-client-3.3.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-3.3.1/package/yast2-ntp-client.changes 
new/yast2-ntp-client-3.3.2/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-3.3.1/package/yast2-ntp-client.changes 2017-07-03 
11:25:34.931339056 +0200
+++ new/yast2-ntp-client-3.3.2/package/yast2-ntp-client.changes 2017-07-14 
17:47:11.600785952 +0200
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
+Thu Jul 13 14:23:11 UTC 2017 - jreidin...@suse.com
+
+- fix crash when restrict entry in autoyast have empty value
+  (bsc#1043370)
+- fix wrong export for trustedkey config entry
+  (bsc#1043370)
+- 3.3.2
+
+-------------------------------------------------------------------
 Fri Jun 30 16:58:16 UTC 2017 - knut.anders...@suse.com
 
 - Resrict records are written at the end but the default file and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-3.3.1/package/yast2-ntp-client.spec 
new/yast2-ntp-client-3.3.2/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-3.3.1/package/yast2-ntp-client.spec    2017-07-03 
11:25:34.931339056 +0200
+++ new/yast2-ntp-client-3.3.2/package/yast2-ntp-client.spec    2017-07-14 
17:47:11.600785952 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        3.3.1
+Version:        3.3.2
 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-3.3.1/src/lib/cfa/ntp_conf.rb 
new/yast2-ntp-client-3.3.2/src/lib/cfa/ntp_conf.rb
--- old/yast2-ntp-client-3.3.1/src/lib/cfa/ntp_conf.rb  2017-07-03 
11:25:34.935339056 +0200
+++ new/yast2-ntp-client-3.3.2/src/lib/cfa/ntp_conf.rb  2017-07-14 
17:47:11.608785952 +0200
@@ -332,10 +332,20 @@
       end
 
       def ensure_tree_value
-        @augeas[:value] = AugeasTreeValue.new(
-          AugeasTree.new,
-          @augeas[:value]
-        ) unless tree_value?
+        case @augeas[:value]
+        when AugeasTreeValue
+          return # we are already there
+        when AugeasTree
+          @augeas[:value] = AugeasTreeValue.new(
+            @augeas[:value],
+            nil
+          )
+        else
+          @augeas[:value] = AugeasTreeValue.new(
+            AugeasTree.new,
+            @augeas[:value]
+          )
+        end
       end
 
       def split_raw_options(raw_options)
@@ -425,11 +435,14 @@
       end
 
       def value=(options)
-        values = options.split("\s")
+        values = options.to_s.split("\s")
         ensure_tree_value
         tree_value.tree.delete("key")
         tree_value.tree.delete("key[]")
-        values.each { |value| tree_value.tree.add("key[]", value) }
+        # fix writting order as key have to be before trailing comment
+        any_matcher = CFA::Matcher.new { true }
+        placer = CFA::BeforePlacer.new(any_matcher)
+        values.reverse.each { |value| tree_value.tree.add("key[]", value, 
placer) }
       end
 
       # here key is actually value and not option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-3.3.1/test/cfa/ntp_conf_test.rb 
new/yast2-ntp-client-3.3.2/test/cfa/ntp_conf_test.rb
--- old/yast2-ntp-client-3.3.1/test/cfa/ntp_conf_test.rb        2017-07-03 
11:25:34.935339056 +0200
+++ new/yast2-ntp-client-3.3.2/test/cfa/ntp_conf_test.rb        2017-07-14 
17:47:11.612785952 +0200
@@ -449,4 +449,12 @@
 
     expect(file.content.lines).to include("trustedkey 1# path to keys file\n")
   end
+
+  it "loads properly when it is defined in file" do
+    file.content << "##comment1\ntrustedkey 1\n"
+    ntp.load
+
+    trustedkey = ntp.records.last
+    expect(trustedkey.value).to eq "1"
+  end
 end


Reply via email to