Hello community, here is the log from the commit of package yast2-ntp-client checked in at Thu May 18 12:03:55 CEST 2006. -------- --- yast2-ntp-client/yast2-ntp-client.changes 2006-05-11 15:31:32.000000000 +0200 +++ yast2-ntp-client/yast2-ntp-client.changes 2006-05-18 10:02:02.000000000 +0200 @@ -1,0 +2,10 @@ +Thu May 18 09:26:20 CEST 2006 - locilka@suse.cz + +- Do not report the empty server address when switching to the + Complex configuration (#176581). +- Fixed behavior when switching to the complex configuration with + no server address defined before. Sometimes it deleted the local + clock entry. +- 2.13.10 + +------------------------------------------------------------------- Old: ---- yast2-ntp-client-2.13.9.tar.bz2 New: ---- yast2-ntp-client-2.13.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ntp-client.spec ++++++ --- /var/tmp/diff_new_pack.ZDtWOJ/_old 2006-05-18 12:03:49.000000000 +0200 +++ /var/tmp/diff_new_pack.ZDtWOJ/_new 2006-05-18 12:03:49.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-ntp-client (Version 2.13.9) +# spec file for package yast2-ntp-client (Version 2.13.10) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-ntp-client -Version: 2.13.9 +Version: 2.13.10 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-ntp-client-2.13.9.tar.bz2 +Source0: yast2-ntp-client-2.13.10.tar.bz2 prefix: /usr BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-slp yast2-testsuite Requires: yast2 yast2-slp yast2-country @@ -33,7 +33,7 @@ Jiri Srain <jsrain@suse.cz> %prep -%setup -n yast2-ntp-client-2.13.9 +%setup -n yast2-ntp-client-2.13.10 %build %{prefix}/bin/y2tool y2autoconf @@ -70,6 +70,13 @@ %doc %{prefix}/share/doc/packages/yast2-ntp-client %changelog -n yast2-ntp-client +* Thu May 18 2006 - locilka@suse.cz +- Do not report the empty server address when switching to the + Complex configuration (#176581). +- Fixed behavior when switching to the complex configuration with + no server address defined before. Sometimes it deleted the local + clock entry. +- 2.13.10 * Thu May 11 2006 - locilka@suse.cz - Adjusting ntp_conf rw agent to be able to understand additional comments on the same line where are already some entries written ++++++ yast2-ntp-client-2.13.9.tar.bz2 -> yast2-ntp-client-2.13.10.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ntp-client-2.13.9/VERSION new/yast2-ntp-client-2.13.10/VERSION --- old/yast2-ntp-client-2.13.9/VERSION 2006-05-11 15:28:26.000000000 +0200 +++ new/yast2-ntp-client-2.13.10/VERSION 2006-05-18 10:01:06.000000000 +0200 @@ -1 +1 @@ -2.13.9 +2.13.10 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ntp-client-2.13.9/configure new/yast2-ntp-client-2.13.10/configure --- old/yast2-ntp-client-2.13.9/configure 2006-05-11 15:32:19.000000000 +0200 +++ new/yast2-ntp-client-2.13.10/configure 2006-05-18 10:03:52.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for yast2-ntp-client 2.13.9. +# Generated by GNU Autoconf 2.59 for yast2-ntp-client 2.13.10. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='yast2-ntp-client' PACKAGE_TARNAME='yast2-ntp-client' -PACKAGE_VERSION='2.13.9' -PACKAGE_STRING='yast2-ntp-client 2.13.9' +PACKAGE_VERSION='2.13.10' +PACKAGE_STRING='yast2-ntp-client 2.13.10' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" @@ -728,7 +728,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-ntp-client 2.13.9 to adapt to many kinds of systems. +\`configure' configures yast2-ntp-client 2.13.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -795,7 +795,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-ntp-client 2.13.9:";; + short | recursive ) echo "Configuration of yast2-ntp-client 2.13.10:";; esac cat <<\_ACEOF @@ -908,7 +908,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -yast2-ntp-client configure 2.13.9 +yast2-ntp-client configure 2.13.10 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -922,7 +922,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-ntp-client $as_me 2.13.9, which was +It was created by yast2-ntp-client $as_me 2.13.10, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1652,7 +1652,7 @@ # Define the identity of the package. PACKAGE='yast2-ntp-client' - VERSION='2.13.9' + VERSION='2.13.10' cat >>confdefs.h <<_ACEOF @@ -1863,7 +1863,7 @@ -VERSION="2.13.9" +VERSION="2.13.10" RPMNAME="yast2-ntp-client" MAINTAINER="Lukas Ocilka <locilka@suse.cz>" @@ -2693,7 +2693,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by yast2-ntp-client $as_me 2.13.9, which was +This file was extended by yast2-ntp-client $as_me 2.13.10, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2748,7 +2748,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -yast2-ntp-client config.status 2.13.9 +yast2-ntp-client config.status 2.13.10 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ntp-client-2.13.9/configure.in new/yast2-ntp-client-2.13.10/configure.in --- old/yast2-ntp-client-2.13.9/configure.in 2006-05-11 15:32:14.000000000 +0200 +++ new/yast2-ntp-client-2.13.10/configure.in 2006-05-18 10:03:48.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.13.18 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-ntp-client, 2.13.9, http://bugs.opensuse.org/, yast2-ntp-client) +AC_INIT(yast2-ntp-client, 2.13.10, http://bugs.opensuse.org/, yast2-ntp-client) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -17,7 +17,7 @@ AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs dnl Important YaST2 variables -VERSION="2.13.9" +VERSION="2.13.10" RPMNAME="yast2-ntp-client" MAINTAINER="Lukas Ocilka <locilka@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ntp-client-2.13.9/src/widgets.ycp new/yast2-ntp-client-2.13.10/src/widgets.ycp --- old/yast2-ntp-client-2.13.9/src/widgets.ycp 2006-04-26 09:19:30.000000000 +0200 +++ new/yast2-ntp-client-2.13.10/src/widgets.ycp 2006-05-18 10:02:27.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Widgets definitions * Authors: Jiri Srain <jsrain@suse.cz> * - * $Id: widgets.ycp 30482 2006-04-26 07:19:25Z locilka $ + * $Id: widgets.ycp 30994 2006-05-18 08:02:21Z locilka $ */ { @@ -133,12 +133,17 @@ * * @return boolean whether the configuration is correct */ -define boolean CheckCurrentSimpleConfiguration () { +define boolean CheckCurrentSimpleConfiguration (boolean check_the_server) { // if the option "random_servers" is selected, do not check the server name if (UI::WidgetExists(`id("use_random_servers")) && (boolean) UI::QueryWidget(`id("use_random_servers"), `Value)) return true; string server_1 = (string) UI::QueryWidget (`id ("server_address"), `Value); + if (!check_the_server && server_1 == "") { + y2milestone("Not checking an empty server..."); + return true; + } + string server_2 = server_1; if (regexpmatch(server_2, "(.*)\.$")) { server_2 = regexpsub (server_2, "(.*)\.$", "\\1"); @@ -159,6 +164,22 @@ } /** + * Check the current confifuration and returns whether some server address is defined + */ +boolean ServerAddressIsInConfiguration () { + boolean ret = false; + + foreach (map<string, any> one_record, NtpClient::ntp_records, { + if (one_record["type"]:nil == "server") { + ret = true; + break; + } + }); + + return ret; +} + +/** * Handle function of the widget * @param key any widget id * @param event map event that caused storing process @@ -166,11 +187,16 @@ */ define symbol complexButtonHandle (string key, map event) ``{ if (event["ID"]:nil == "complex_button") { - boolean conf_check = CheckCurrentSimpleConfiguration(); + // true - check and report the missing server value + // false - the opposite + boolean handle_the_server = ((string) UI::QueryWidget (`id ("server_address"), `Value) != ""); + + boolean conf_check = CheckCurrentSimpleConfiguration(handle_the_server); y2milestone("Checking the current simple configuration returned: %1", conf_check); NtpClient::selected_record["address"] = UI::QueryWidget (`id ("server_address"), `Value); // disabled in case of PoolNTPorg feature + // and in case of missing server value if ((boolean) UI::QueryWidget (`id ("server_address"), `Enabled) && NtpClient::selected_record["address"]:nil != nil && NtpClient::selected_record["address"]:"" != "") { @@ -178,6 +204,13 @@ NtpClient::selected_record["initial_sync"] = true; y2milestone("Storing the current address record: %1", NtpClient::selected_record); NtpClient::storeSyncRecord(); + // deleting the current record if current server address is empty + } else if (NtpClient::selected_record["address"]:"" == "") { + // delete only the server record if there is some current server record + if (ServerAddressIsInConfiguration()) { + NtpClient::selected_record = nil; + NtpClient::storeSyncRecord(); + } } y2milestone("Switching to complex configuration..."); @@ -441,9 +474,13 @@ * @param event map event that caused storing process */ define void addressStore (string id, map event) ``{ + // Don't store anything in case of switching to the complex configuration + if (event["ID"]:nil == `complex) return; + NtpClient::selected_record["address"] = UI::QueryWidget (`id (id), `Value); if (NtpClient::simple_dialog) { + y2milestone("Storing the server address in simple configuration"); NtpClient::selected_record["type"] = "server"; NtpClient::selected_record["initial_sync"] = true; } @@ -469,7 +506,7 @@ return true; } - return CheckCurrentSimpleConfiguration(); + return CheckCurrentSimpleConfiguration(true); } /** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de