Hello community,

here is the log from the commit of package yast2-country for openSUSE:Factory 
checked in at 2019-02-24 18:02:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-country (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-country.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-country"

Sun Feb 24 18:02:35 2019 rev:199 rq:677101 version:4.1.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes      
2018-12-31 09:44:34.778305531 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-country.new.28833/yast2-country.changes   
2019-02-24 18:02:36.067790932 +0100
@@ -1,0 +2,6 @@
+Mon Feb 18 11:36:47 UTC 2019 - [email protected]
+
+- fix timezone setting when switching utc/local time (bsc#1087228)
+- 4.1.8
+
+-------------------------------------------------------------------

Old:
----
  yast2-country-4.1.7.tar.bz2

New:
----
  yast2-country-4.1.8.tar.bz2

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

Other differences:
------------------
++++++ yast2-country.spec ++++++
--- /var/tmp/diff_new_pack.EEcJzh/_old  2019-02-24 18:02:36.439790806 +0100
+++ /var/tmp/diff_new_pack.EEcJzh/_new  2019-02-24 18:02:36.443790805 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-country
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-country
-Version:        4.1.7
+Version:        4.1.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-country-4.1.7.tar.bz2 -> yast2-country-4.1.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-4.1.7/package/yast2-country.changes 
new/yast2-country-4.1.8/package/yast2-country.changes
--- old/yast2-country-4.1.7/package/yast2-country.changes       2018-12-18 
16:27:38.000000000 +0100
+++ new/yast2-country-4.1.8/package/yast2-country.changes       2019-02-18 
12:44:15.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Feb 18 11:36:47 UTC 2019 - [email protected]
+
+- fix timezone setting when switching utc/local time (bsc#1087228)
+- 4.1.8
+
+-------------------------------------------------------------------
 Tue Dec 18 14:29:34 UTC 2018 - [email protected]
 
 - always use absolute path to binaries (bsc#1118291)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-4.1.7/package/yast2-country.spec 
new/yast2-country-4.1.8/package/yast2-country.spec
--- old/yast2-country-4.1.7/package/yast2-country.spec  2018-12-18 
16:27:38.000000000 +0100
+++ new/yast2-country-4.1.8/package/yast2-country.spec  2019-02-18 
12:44:15.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-country
-Version:        4.1.7
+Version:        4.1.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-country-4.1.7/timezone/src/include/timezone/dialogs.rb 
new/yast2-country-4.1.8/timezone/src/include/timezone/dialogs.rb
--- old/yast2-country-4.1.7/timezone/src/include/timezone/dialogs.rb    
2018-12-18 16:27:38.000000000 +0100
+++ new/yast2-country-4.1.8/timezone/src/include/timezone/dialogs.rb    
2019-02-18 12:44:15.000000000 +0100
@@ -877,6 +877,20 @@
           end
         end
 
+        if ret == :hwclock
+          # Keep internal state in sync (Timezone.hwclock <-> @hwclock_s) in
+          # case user enters SetTimeDialog() and sets the time (bsc#1087228).
+
+          @hwclock_s = UI.QueryWidget(Id(:hwclock), :Value) ? :hwclock_utc : 
:hwclock_localtime
+          SetTimezone(@hwclock_s, timezone, false, false)
+
+          Builtins.y2milestone("hwclock changed to: %1 (%2), diff: %3", 
@hwclock_s, Timezone.hwclock, Timezone.diff)
+
+          # restart input loop
+          ret = :again
+          next
+        end
+
         if ret == :region
           num = selected_region.call
           next if num == sel
@@ -904,7 +918,10 @@
             end
           end
           if SetTimeDialog()
+            # Time has just been set in the system. Reset internal state as 
we're definitely in sync atm.
             Timezone.diff = 0
+            @hwclock_s_initial = @hwclock_s
+
             UI.ChangeWidget(
               Id(:date),
               :Value,
@@ -920,8 +937,7 @@
                 _("Date and Time")
             UI.ChangeWidget(Id(:time_fr), :Label, time_frame_label)
           end
-        elsif ret == :next || ret == :timezone || ret == :timezonemap ||
-            ret == :hwclock
+        elsif ret == :next || ret == :timezone || ret == :timezonemap
           if ret == :timezonemap
             timezone = Convert.to_string(
               UI.QueryWidget(Id(:timezonemap), :Value)
@@ -954,7 +970,8 @@
             ret = :again
             timezone = timezone_old
           end
-          Builtins.y2milestone("timezone %1 ret %2", timezone, ret)
+
+          Builtins.y2milestone("timezone %1 ret %2, hwclock %3 -> %4", 
timezone, ret, hwclock_s_old, @hwclock_s)
 
           if timezone != timezone_old || @hwclock_s != hwclock_s_old ||
               ret == :next
@@ -978,6 +995,9 @@
               Timezone.call_mkinitrd = true
             end
 
+            # save settings (update /etc/adjtime)
+            Timezone.Save
+
             if @ntp_used && @ntp_server != ""
               # save NTP client settings now
               ntp_call(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-country-4.1.7/timezone_todo.md 
new/yast2-country-4.1.8/timezone_todo.md
--- old/yast2-country-4.1.7/timezone_todo.md    1970-01-01 01:00:00.000000000 
+0100
+++ new/yast2-country-4.1.8/timezone_todo.md    2019-02-18 12:44:15.000000000 
+0100
@@ -0,0 +1,44 @@
+## UI Inconsistencies
+
+### Clock and Time Zone dialog
+
+- `Other Settings...` leads to a `Change Date and Time` dialog - and you
+  really can't do anything else there. So the menu item should be named
+  such; maybe even simply `Change Date and Time`.
+
+### Change Date and Time dialog
+
+- In `Manually` there is a `Change the Time Now` checkbox. If you uncheck
+  it the whole `Manually` item is grayed out - so what's the point?
+  AFAICS this checkbox could be removed.
+
+## Integration testing
+
+When doing integration tests, verify that:
+
+- the link `/etc/localtime` points to the correct timezone
+- the 3rd line in `/etc/adjtime` is set correctly to either `UTC` or `LOCAL`
+- `hwclock -rv` shows the correct time from hardware clock
+- `date` shows the correct system time
+
+Test that:
+
+- switching timezones in UTC adjusts the `Date and Time` UI element
+- switching timezones in local time does NOT change `Date and Time`
+- toggling the checkbox in `Hardware Clock Set to UTC` correctly adjusts `Date 
and Time`
+- the above three tests work correctly after going to `Other Settings...` and 
setting the time there
+- the above three tests work correctly after going to `Other Settings...` and 
aborting the dialog
+- while in the `Clock and Time Zone` dialog the system state is not changed
+- ... but entering `Other Settings...` and changing the time there does change 
the system settings immediately and
+  the `Clock and Time Zone` dialog reflects these changes
+- as it happens the ncurses and qt UIs are different, so test both
+- also, install mode and normal (in the running system) are not identical, so 
test both
+- also, there are (s390) arch differences, so if you care, test that also
+
+## Refactoring
+
+- there are a lot of YCP remains (`Ops.XXX`)
+- the wizard dialogs are basically two huge blobs in two functions
+- the state is partly in the dialogs, partly in the Timezone object, which is 
really annoying
+  when working with the code and makes it hard to test
+- `timezone/dialogs.rb#SetTimezone`'s `changed_time` arg looks superfluous (is 
never used)


Reply via email to