Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-journal for openSUSE:Factory checked in at 2022-10-01 17:41:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-journal (Old) and /work/SRC/openSUSE:Factory/.yast2-journal.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-journal" Sat Oct 1 17:41:42 2022 rev:21 rq:1006340 version:4.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-journal/yast2-journal.changes 2022-07-21 11:32:43.118913229 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-journal.new.2275/yast2-journal.changes 2022-10-01 17:41:47.457520803 +0200 @@ -1,0 +2,7 @@ +Tue Sep 27 07:18:47 UTC 2022 - Martin Vidner <[email protected]> + +- Localize date range in Change Filter dialog (B S Srinidhi, + bsc#1081459) +- 4.5.2 + +------------------------------------------------------------------- Old: ---- yast2-journal-4.5.1.tar.bz2 New: ---- yast2-journal-4.5.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-journal.spec ++++++ --- /var/tmp/diff_new_pack.ntvSZC/_old 2022-10-01 17:41:47.853521525 +0200 +++ /var/tmp/diff_new_pack.ntvSZC/_new 2022-10-01 17:41:47.857521533 +0200 @@ -17,7 +17,7 @@ Name: yast2-journal -Version: 4.5.1 +Version: 4.5.2 Release: 0 URL: https://github.com/yast/yast-journal Summary: YaST2 - Reading of systemd journal ++++++ yast2-journal-4.5.1.tar.bz2 -> yast2-journal-4.5.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-journal-4.5.1/package/yast2-journal.changes new/yast2-journal-4.5.2/package/yast2-journal.changes --- old/yast2-journal-4.5.1/package/yast2-journal.changes 2022-07-19 11:49:34.000000000 +0200 +++ new/yast2-journal-4.5.2/package/yast2-journal.changes 2022-09-27 09:39:16.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Sep 27 07:18:47 UTC 2022 - Martin Vidner <[email protected]> + +- Localize date range in Change Filter dialog (B S Srinidhi, + bsc#1081459) +- 4.5.2 + +------------------------------------------------------------------- Mon Jul 18 08:36:08 UTC 2022 - Martin Vidner <[email protected]> - Adapt to changed output of journalctl --list-boots, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-journal-4.5.1/package/yast2-journal.spec new/yast2-journal-4.5.2/package/yast2-journal.spec --- old/yast2-journal-4.5.1/package/yast2-journal.spec 2022-07-19 11:49:34.000000000 +0200 +++ new/yast2-journal-4.5.2/package/yast2-journal.spec 2022-09-27 09:39:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-journal -Version: 4.5.1 +Version: 4.5.2 Release: 0 Group: System/YaST License: GPL-2.0 or GPL-3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-journal-4.5.1/src/lib/y2journal/query.rb new/yast2-journal-4.5.2/src/lib/y2journal/query.rb --- old/yast2-journal-4.5.1/src/lib/y2journal/query.rb 2022-07-19 11:49:34.000000000 +0200 +++ new/yast2-journal-4.5.2/src/lib/y2journal/query.rb 2022-09-27 09:39:16.000000000 +0200 @@ -85,9 +85,9 @@ # # Each boot is represented by a hash with three elements, with all the keys # being symbols and all the values being strings. - # * id: 32-character identifier - # * offset: offset relative to the current boot - # * timestamps: timestamps of the first and last message for the boot + # * :id => 32-character identifier + # * :offset => offset relative to the current boot (String) + # * :timestamps: Hash with :since, :until => Time def self.boots lines = Journalctl.new({ "list-boots" => nil, "quiet" => nil }, []).output.lines lines.map do |line| @@ -95,11 +95,14 @@ # (slightly stripped down, see test/data for full-length examples) # -1 a07ac0f240 Sun 2014-12-14 16:50:09 CET???Mon 2015-01-26 19:18:43 CET # 0 24a9a83ecf Mon 2015-01-26 19:55:33 CET???Mon 2015-01-26 20:05:16 CET - if line.strip =~ /^\s*(-*\d+)\s+(\w+)\s+(.+)$/ + if line.strip =~ /^\s*(-*\d+)\s+(\w+)\s+(.+)???(.+)$/ { id: Regexp.last_match[2], offset: Regexp.last_match[1], - timestamps: Regexp.last_match[3] + timestamps: { + since: ::Time.parse(Regexp.last_match[3]), + until: ::Time.parse(Regexp.last_match[4]) + } } else raise "Unexpected output for journalctl --list-boots: #{line}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-journal-4.5.1/src/lib/y2journal/query_presenter.rb new/yast2-journal-4.5.2/src/lib/y2journal/query_presenter.rb --- old/yast2-journal-4.5.1/src/lib/y2journal/query_presenter.rb 2022-07-19 11:49:34.000000000 +0200 +++ new/yast2-journal-4.5.2/src/lib/y2journal/query_presenter.rb 2022-09-27 09:39:16.000000000 +0200 @@ -55,7 +55,7 @@ # Decorated entries # - # @return [Array<EntryPresenter] + # @return [Array<EntryPresenter>] def entries query.entries.map { |entry| EntryPresenter.new(entry) } end @@ -84,11 +84,7 @@ when "-1" _("From previous boot") when Hash - dates = { - since: Yast::Builtins.strftime(interval[:since], TIME_FORMAT), - until: Yast::Builtins.strftime(interval[:until], TIME_FORMAT) - } - _("Between %{since} and %{until}") % dates + self.class.localize_interval(interval) when nil _("No time restriction") else @@ -96,6 +92,16 @@ end end + # @param interval [Hash] :since => time, :until => time + # @return [String] + def self.localize_interval(interval) + dates = { + since: Yast::Builtins.strftime(interval[:since], TIME_FORMAT), + until: Yast::Builtins.strftime(interval[:until], TIME_FORMAT) + } + _("Between %{since} and %{until}") % dates + end + # Possible intervals for a QueryPresenter object to be used in forms # # @return [Array<Hash>] each interval is represented by a hash with two keys @@ -106,11 +112,13 @@ intervals << { value: Hash, label: _("Between these dates") } - label = _("Since system's boot (%s)") % boots.last[:timestamps] + label = _("Since system's boot (%s)") % + localize_interval(boots.last[:timestamps]) intervals << { value: "0", label: label } if boots.size > 1 - label = _("From previous boot (%s)") % boots[-2][:timestamps] + label = _("From previous boot (%s)") % + localize_interval(boots[-2][:timestamps]) intervals << { value: "-1", label: label } end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-journal-4.5.1/test/query_test.rb new/yast2-journal-4.5.2/test/query_test.rb --- old/yast2-journal-4.5.1/test/query_test.rb 2022-07-19 11:49:34.000000000 +0200 +++ new/yast2-journal-4.5.2/test/query_test.rb 2022-09-27 09:39:16.000000000 +0200 @@ -218,12 +218,18 @@ expect(subject.first).to eq( offset: "-10", id: "f02631731f744344859a5b7222d815d6", - timestamps: "Wed 2014-10-01 21:12:23 CEST???Sun 2014-10-05 20:36:49 CEST" + timestamps: { + since: ::Time.parse("Wed 2014-10-01 21:12:23 CEST"), + until: ::Time.parse("Sun 2014-10-05 20:36:49 CEST") + } ) expect(subject.last).to eq( offset: "0", id: "24a9a89c43d34f859399f7994a233ecf", - timestamps: "Mon 2015-01-26 19:55:33 CET???Mon 2015-01-26 20:05:16 CET" + timestamps: { + since: ::Time.parse("Mon 2015-01-26 19:55:33 CET"), + until: ::Time.parse("Mon 2015-01-26 20:05:16 CET") + } ) end end
