Hello community,
here is the log from the commit of package yast2-country for openSUSE:Factory
checked in at Wed Apr 14 15:32:27 CEST 2010.
--------
--- yast2-country/yast2-country.changes 2010-04-02 08:45:43.000000000 +0200
+++ yast2-country/yast2-country.changes 2010-04-14 11:51:01.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Apr 14 11:49:53 CEST 2010 - jsuchome@suse.cz
+
+- TIMEZONE.pm: search for language only when full locale was
+ not given (preparation for bnc#558364)
+- 2.19.13
+
+-------------------------------------------------------------------
+Tue Apr 6 13:57:12 CEST 2010 - jsuchome@suse.cz
+
+- enable switching off NTP (bnc#589296)
+- 2.19.12
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-country-2.19.11.tar.bz2
New:
----
yast2-country-2.19.13.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-country.spec ++++++
--- /var/tmp/diff_new_pack.8xMMRT/_old 2010-04-14 15:32:08.000000000 +0200
+++ /var/tmp/diff_new_pack.8xMMRT/_new 2010-04-14 15:32:08.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-country (Version 2.19.11)
+# spec file for package yast2-country (Version 2.19.13)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,11 +19,11 @@
Name: yast2-country
-Version: 2.19.11
+Version: 2.19.13
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-country-2.19.11.tar.bz2
+Source0: yast2-country-2.19.13.tar.bz2
Prefix: /usr
@@ -79,7 +79,7 @@
timezone) for yast2.
%prep
-%setup -n yast2-country-2.19.11
+%setup -n yast2-country-2.19.13
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-country-2.19.11.tar.bz2 -> yast2-country-2.19.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-2.19.11/VERSION new/yast2-country-2.19.13/VERSION
--- old/yast2-country-2.19.11/VERSION 2010-04-02 08:45:04.000000000 +0200
+++ new/yast2-country-2.19.13/VERSION 2010-04-14 11:50:16.000000000 +0200
@@ -1 +1 @@
-2.19.11
+2.19.13
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-2.19.11/timezone/src/Timezone.ycp new/yast2-country-2.19.13/timezone/src/Timezone.ycp
--- old/yast2-country-2.19.11/timezone/src/Timezone.ycp 2010-04-01 15:13:48.000000000 +0200
+++ new/yast2-country-2.19.13/timezone/src/Timezone.ycp 2010-04-08 13:58:49.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Klaus Kaempf
* Thomas Roelz
*
- * $Id: Timezone.ycp 61572 2010-04-01 13:13:47Z jsuchome $
+ * $Id: Timezone.ycp 61612 2010-04-08 11:58:48Z jsuchome $
*/
{
@@ -390,6 +390,8 @@
cmd = "/sbin/hwclock --hctosys " + hwclock;
y2milestone( "SetTime cmd %1", cmd );
SCR::Execute(.target.bash, cmd );
+ // actually, it was probably not called, but do not let it change the time again after manual change
+ systz_called = true;
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-2.19.11/timezone/src/YaPI/TIME.pm new/yast2-country-2.19.13/timezone/src/YaPI/TIME.pm
--- old/yast2-country-2.19.11/timezone/src/YaPI/TIME.pm 2010-03-09 13:45:43.000000000 +0100
+++ new/yast2-country-2.19.13/timezone/src/YaPI/TIME.pm 2010-04-14 10:57:27.000000000 +0200
@@ -7,6 +7,7 @@
textdomain("time");
# ------------------- imported modules
+YaST::YCP::Import ("Language");
YaST::YCP::Import ("Timezone");
# -------------------------------------
@@ -42,7 +43,19 @@
$ret->{"timezone"} = Timezone->timezone;
}
if (($args->{"language"} || "") ne "") {
- $ret->{"timezone_for_language"} = Timezone->GetTimezoneForLanguage ($args->{"language"} || "", "");
+ my $language = $args->{"language"} || "";
+ my $timezone_for_language = Timezone->GetTimezoneForLanguage ($language, "");
+ # no timezone for this locale, try guessing only by language
+ unless ($timezone_for_language) {
+ my $lang_map = Language->GetLanguagesMap(0);
+ foreach my $lang (keys %$lang_map) {
+ if (substr ($lang, 0, 2) eq $language) {
+ $timezone_for_language = Timezone->GetTimezoneForLanguage ($lang, "");
+ last;
+ }
+ }
+ }
+ $ret->{"timezone_for_language"} = $timezone_for_language;
}
return $ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-2.19.11/timezone/src/dialogs.ycp new/yast2-country-2.19.13/timezone/src/dialogs.ycp
--- old/yast2-country-2.19.11/timezone/src/dialogs.ycp 2010-04-01 13:28:51.000000000 +0200
+++ new/yast2-country-2.19.13/timezone/src/dialogs.ycp 2010-04-08 13:58:49.000000000 +0200
@@ -11,7 +11,7 @@
* Summary:
* Dialogs for timeone and time configuration.
*
- * $Id: dialogs.ycp 59953 2009-12-04 13:19:59Z jsuchome $
+ * $Id: dialogs.ycp 61612 2010-04-08 11:58:48Z jsuchome $
*/
{
textdomain "country";
@@ -36,6 +36,9 @@
// if system clock is configured to sync with NTP
boolean ntp_used = false;
+ // ntp server configured to sync with
+ string ntp_server = "";
+
// if packages for NTP configuration are installed
boolean ntp_installed = false;
@@ -151,6 +154,28 @@
}
}
+ void enable_disable_time_widgets (boolean enable) {
+
+ UI::ChangeWidget (`id (`change_now), `Enabled, enable);
+
+ enable = enable && (boolean) UI::QueryWidget (`id (`change_now), `Value);
+
+ if (dt_widgets)
+ {
+ UI::ChangeWidget (`id (`date), `Enabled, enable);
+ UI::ChangeWidget (`id (`time), `Enabled, enable);
+ }
+ else
+ {
+ UI::ChangeWidget (`id(`hour), `Enabled, enable);
+ UI::ChangeWidget (`id(`minute), `Enabled, enable);
+ UI::ChangeWidget (`id(`second), `Enabled, enable);
+ UI::ChangeWidget (`id(`day), `Enabled, enable);
+ UI::ChangeWidget (`id(`month), `Enabled, enable);
+ UI::ChangeWidget (`id(`year), `Enabled, enable);
+ }
+ }
+
term dateterm = `VBox (
`HBox (
`HSpacing(1),
@@ -210,7 +235,12 @@
`VBox (
`Left (timeterm),
`VSpacing(),
- `Left (dateterm)
+ `Left (dateterm),
+ `VSpacing (),
+ `HBox (`HSpacing (0.5), `Left (
+ // check box label
+ `CheckBox (`id (`change_now), `opt (`notify), _("Change the Time Now"), true))
+ )
)
),
`VSpacing (1),
@@ -246,11 +276,11 @@
});
}
-
any ret = nil;
repeat
{
ntp_call ("ui_enable_disable_widgets", $["enabled": ntp_rb]);
+ enable_disable_time_widgets (!ntp_rb);
ret = UI::UserInput();
y2debug ("UserInput ret:%1", ret );
@@ -291,16 +321,18 @@
// before the sync, save the time zone (bnc#467318)
Timezone::Set (Timezone::timezone, Stage::initial () && !Mode::live_installation ());
// true: go on, exit; false: loop on
- boolean ntp_handled = (boolean) ntp_call ("ui_try_save", $[]);
+ boolean ntp_handled = (boolean) ntp_call ("ui_try_save", $[ "ntpdate_only" : true]);
if (!ntp_handled)
ret = `retry; // loop on
else
{
+ // `ntp_address is constructed by ntp-client_proposal.ycp... :-(
+ ntp_server = (string) UI::QueryWidget(`id(`ntp_address), `Value);
// after sync, show real time in the widget
Timezone::diff = 0;
}
}
- if (ret == `accept && !ntp_rb)
+ if (ret == `accept && !ntp_rb && UI::QueryWidget (`id (`change_now), `Value) == true)
{
if (dt_widgets)
{
@@ -355,9 +387,13 @@
if (ret == `accept)
{
// new system time from ntpdate must be saved to hw clock
- Timezone::SystemTime2HWClock ();
+ if (ntp_rb)
+ {
+ Timezone::SystemTime2HWClock ();
+ }
// remember ui
ntp_call ("SetUseNTP", $["ntp_used" : ntp_rb]);
+ ntp_used = ntp_rb;
}
Wizard::CloseDialog ();
@@ -447,9 +483,9 @@
ntp_used = true;
// configure NTP client
srandom ();
- string server = sformat ("%1.opensuse.pool.ntp.org", random (4));
+ ntp_server = sformat ("%1.opensuse.pool.ntp.org", random (4));
map argmap = $[
- "server" : server,
+ "server" : ntp_server,
// FIXME ntp-client_proposal doesn't understand 'servers' yet
"servers" : [
"0.opensuse.pool.ntp.org",
@@ -457,17 +493,18 @@
"2.opensuse.pool.ntp.org",
"3.opensuse.pool.ntp.org",
],
+ "ntpdate_only" : true
];
symbol rv = (symbol) ntp_call ("Write", argmap);
if (rv == `invalid_hostname)
{
- y2warning ("Invalid NTP server hostname %1", server);
+ y2warning ("Invalid NTP server hostname %1", ntp_server);
ntp_used = false;
}
else
{
Timezone::SystemTime2HWClock ();
- y2milestone ("proposing NTP server %1", server);
+ y2milestone ("proposing NTP server %1", ntp_server);
ntp_call ("SetUseNTP", $["ntp_used" : ntp_used]);
}
}
@@ -807,6 +844,15 @@
Timezone::user_decision = true;
Timezone::user_hwclock = true;
Timezone::ntp_used = ntp_used;
+
+ if (ntp_used && ntp_server != "")
+ {
+ // save NTP client settings now
+ ntp_call ("Write", $[
+ "server" : ntp_server,
+ "write_only": true
+ ]);
+ }
}
}
} until ( ret == `next || ret == `back || ret == `cancel );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org