Hello community,
here is the log from the commit of package yast2
checked in at Thu Mar 13 13:28:28 CET 2008.
--------
--- yast2/yast2.changes 2008-03-11 18:16:48.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2/yast2.changes 2008-03-12 22:34:43.592459000 +0100
@@ -1,0 +2,13 @@
+Wed Mar 12 17:16:20 CET 2008 - locilka@suse.cz
+
+- Adjusted ProductControl to evaluate `accept and `ok as if it was
+ `next (bnc #369846).
+
+-------------------------------------------------------------------
+Tue Mar 11 16:14:30 CET 2008 - jsrain@suse.cz
+
+- added infrastructure to detect configuration files changed not
+ by YaST and warn users about such changes possibly getting lost
+ (fate #303374)
+
+-------------------------------------------------------------------
@@ -4 +17 @@
-- improved String::FormatRateMessage() (needed for bnc#168935)
+- improved String::FormatRateMessage() (needed for bnc #168935)
Old:
----
yast2-2.16.34.tar.bz2
New:
----
yast2-2.16.35.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.L17252/_old 2008-03-13 13:28:11.000000000 +0100
+++ /var/tmp/diff_new_pack.L17252/_new 2008-03-13 13:28:11.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2 (Version 2.16.34)
+# spec file for package yast2 (Version 2.16.35)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2
-Version: 2.16.34
+Version: 2.16.35
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.16.34.tar.bz2
+Source0: yast2-2.16.35.tar.bz2
Prefix: /usr
Source1: yast2-rpmlintrc
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-perl-bindings yast2-testsuite
@@ -132,7 +132,7 @@
Steffen Winterfeldt
%prep
-%setup -n yast2-2.16.34
+%setup -n yast2-2.16.35
%build
%{prefix}/bin/y2tool y2autoconf
@@ -237,8 +237,15 @@
%doc %{prefix}/share/doc/packages/yast2/wizard
%changelog
+* Wed Mar 12 2008 locilka@suse.cz
+- Adjusted ProductControl to evaluate `accept and `ok as if it was
+ `next (bnc #369846).
+* Tue Mar 11 2008 jsrain@suse.cz
+- added infrastructure to detect configuration files changed not
+ by YaST and warn users about such changes possibly getting lost
+ (fate #303374)
* Tue Mar 11 2008 lslezak@suse.cz
-- improved String::FormatRateMessage() (needed for bnc#168935)
+- improved String::FormatRateMessage() (needed for bnc #168935)
- 2.16.34
* Wed Mar 05 2008 lslezak@suse.cz
- register Refresh callbacks (required for FATE #30962, bnc #231745)
++++++ yast2-2.16.34.tar.bz2 -> yast2-2.16.35.tar.bz2 ++++++
++++ 4108 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/configure.in new/yast2-2.16.35/configure.in
--- old/yast2-2.16.34/configure.in 2008-03-11 13:14:10.000000000 +0100
+++ new/yast2-2.16.35/configure.in 2008-03-05 16:05:11.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2
dnl
-dnl -- This file is generated by y2autoconf 2.16.6 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.3 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.16.34, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.16.31, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.34"
+VERSION="2.16.31"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/control/src/ProductControl.ycp new/yast2-2.16.35/library/control/src/ProductControl.ycp
--- old/yast2-2.16.34/library/control/src/ProductControl.ycp 2008-03-07 09:22:37.000000000 +0100
+++ new/yast2-2.16.35/library/control/src/ProductControl.ycp 2008-03-12 17:18:28.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Product Control routines
* Authors: Anas Nashif
*
- * $Id: ProductControl.ycp 45256 2008-03-06 09:17:18Z locilka $
+ * $Id: ProductControl.ycp 45389 2008-03-12 16:18:28Z locilka $
*/
{
textdomain "base";
@@ -977,6 +977,12 @@
symbol result = (symbol) WFM::CallFunction (getClientName(step_name), args);
y2milestone ("Calling %1 returned %2", argterm, result);
+ // bnc #369846
+ if (result == `accept || result == `ok) {
+ y2milestone ("Evaluating %1 as it was `next", result);
+ result = `next;
+ }
+
// Clients can break the installation/workflow
Wizard::RestoreNextButton();
Wizard::RestoreAbortButton();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/modules/Version.ycp new/yast2-2.16.35/library/modules/Version.ycp
--- old/yast2-2.16.34/library/modules/Version.ycp 2008-03-11 13:14:24.000000000 +0100
+++ new/yast2-2.16.35/library/modules/Version.ycp 2008-03-12 17:26:04.000000000 +0100
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.16.34";
+global string yast2 = "2.16.35";
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/network/src/yast2-services-translations.ycp new/yast2-2.16.35/library/network/src/yast2-services-translations.ycp
--- old/yast2-2.16.34/library/network/src/yast2-services-translations.ycp 2007-11-20 13:15:59.000000000 +0100
+++ new/yast2-2.16.35/library/network/src/yast2-services-translations.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,226 +0,0 @@
-{
- /**
- * This file contains only translations for
- * FATE #300687: Ports for SuSEfirewall added via packages
- *
- * Translations are grabbed when 'make pot' is called.
- */
-
- textdomain "firewall-services";
-
- string tmpstring = nil;
-
- // TRANSLATORS: Name of Service (rpm: apache2), can be used as check box, item in multiple selection box...
- tmpstring = _("Apache 2");
-
- // TRANSLATORS: Description of a Service (rpm: apache2), used as a common label or an item in table
- tmpstring = _("Opens ports for Apache Web Server.");
-
- // TRANSLATORS: Name of Service (rpm: apache2-ssl), can be used as check box, item in multiple selection box...
- tmpstring = _("Apache 2");
-
- // TRANSLATORS: Description of a Service (rpm: apache2-ssl), used as a common label or an item in table
- tmpstring = _("Opens ports for Apache Web Server.");
-
- // TRANSLATORS: Name of Service (rpm: avahi), can be used as check box, item in multiple selection box...
- tmpstring = _("Zeroconf/Bonjour Multicast DNS");
-
- // TRANSLATORS: Description of a Service (rpm: avahi), used as a common label or an item in table
- tmpstring = _("Zeroconf/Bonjour Multicast DNS (mDNS) ports for Service Discovery (DNS-SD)");
-
- // TRANSLATORS: Description of a Service (rpm: bacula-dir), used as a common label or an item in table
- tmpstring = _("Bacula Director ");
-
- // TRANSLATORS: Description of a Service (rpm: bacula-fd), used as a common label or an item in table
- tmpstring = _("Bacula File Daemon ");
-
- // TRANSLATORS: Description of a Service (rpm: bacula-sd), used as a common label or an item in table
- tmpstring = _("Bacula Storage Daemon ");
-
- // TRANSLATORS: Name of Service (rpm: bind), can be used as check box, item in multiple selection box...
- tmpstring = _("bind DNS server");
-
- // TRANSLATORS: Description of a Service (rpm: bind), used as a common label or an item in table
- tmpstring = _("Open ports for the bind DNS server");
-
- // TRANSLATORS: Name of Service (rpm: courier-imap), can be used as check box, item in multiple selection box...
- tmpstring = _("courier-imapd");
-
- // TRANSLATORS: Description of a Service (rpm: courier-imap), used as a common label or an item in table
- tmpstring = _("Opens ports for courier-imapd.");
-
- // TRANSLATORS: Name of Service (rpm: courier-imap-ssl), can be used as check box, item in multiple selection box...
- tmpstring = _("courier-imapd");
-
- // TRANSLATORS: Description of a Service (rpm: courier-imap-ssl), used as a common label or an item in table
- tmpstring = _("Opens ports for courier-imapd.");
-
- // TRANSLATORS: Name of Service (rpm: cups), can be used as check box, item in multiple selection box...
- tmpstring = _("cups");
-
- // TRANSLATORS: Description of a Service (rpm: cups), used as a common label or an item in table
- tmpstring = _("Firewall Configuration file for printing service CUPS");
-
- // TRANSLATORS: Name of Service (rpm: cyrus-imapd), can be used as check box, item in multiple selection box...
- tmpstring = _("cyrus-imapd Server");
-
- // TRANSLATORS: Description of a Service (rpm: cyrus-imapd), used as a common label or an item in table
- tmpstring = _("Opens ports for the cyrus-imapd Server.");
-
- // TRANSLATORS: Name of Service (rpm: dhcp-server), can be used as check box, item in multiple selection box...
- tmpstring = _("DHCP Server");
-
- // TRANSLATORS: Description of a Service (rpm: dhcp-server), used as a common label or an item in table
- tmpstring = _("Opens ports for ISC DHCP Server.");
-
- // TRANSLATORS: Name of Service (rpm: dnsmasq-dhcp), can be used as check box, item in multiple selection box...
- tmpstring = _("dnsmasq");
-
- // TRANSLATORS: Description of a Service (rpm: dnsmasq-dhcp), used as a common label or an item in table
- tmpstring = _("Open ports for the dnsmasq DNS/DHCP server");
-
- // TRANSLATORS: Name of Service (rpm: dnsmasq-dns), can be used as check box, item in multiple selection box...
- tmpstring = _("dnsmasq");
-
- // TRANSLATORS: Description of a Service (rpm: dnsmasq-dns), used as a common label or an item in table
- tmpstring = _("Open ports for the dnsmasq DNS/DHCP server");
-
- // TRANSLATORS: Name of Service (rpm: iscsitarget), can be used as check box, item in multiple selection box...
- tmpstring = _("iSCSI Target Daemon");
-
- // TRANSLATORS: Description of a Service (rpm: iscsitarget), used as a common label or an item in table
- tmpstring = _("Opens ports for iSCSI Target Daemon with broadcast allowed.");
-
- // TRANSLATORS: Name of Service (rpm: isns), can be used as check box, item in multiple selection box...
- tmpstring = _("iSNS Daemon");
-
- // TRANSLATORS: Description of a Service (rpm: isns), used as a common label or an item in table
- tmpstring = _("Opens ports for iSNS daemon with broadcast allowed.");
-
- // TRANSLATORS: Name of Service (rpm: kadmind), can be used as check box, item in multiple selection box...
- tmpstring = _("Kerberos Admin Server");
-
- // TRANSLATORS: Description of a Service (rpm: kadmind), used as a common label or an item in table
- tmpstring = _("Open ports for kadmind Server");
-
- // TRANSLATORS: Name of Service (rpm: kdc), can be used as check box, item in multiple selection box...
- tmpstring = _("Key Distribution Center");
-
- // TRANSLATORS: Description of a Service (rpm: kdc), used as a common label or an item in table
- tmpstring = _("Open ports for the Key Distribution Center");
-
- // TRANSLATORS: Name of Service (rpm: lighttpd), can be used as check box, item in multiple selection box...
- tmpstring = _("lighttpd");
-
- // TRANSLATORS: Description of a Service (rpm: lighttpd), used as a common label or an item in table
- tmpstring = _("Open the http port for lighttpd.");
-
- // TRANSLATORS: Name of Service (rpm: lighttpd-ssl), can be used as check box, item in multiple selection box...
- tmpstring = _("lighttpd");
-
- // TRANSLATORS: Description of a Service (rpm: lighttpd-ssl), used as a common label or an item in table
- tmpstring = _("Open the https port for lighttpd.");
-
- // TRANSLATORS: Name of Service (rpm: mysql), can be used as check box, item in multiple selection box...
- tmpstring = _("MySQL server");
-
- // TRANSLATORS: Description of a Service (rpm: mysql), used as a common label or an item in table
- tmpstring = _("opens ports for MySQL in order to allow other hosts connect to it");
-
- // TRANSLATORS: Name of Service (rpm: nut), can be used as check box, item in multiple selection box...
- tmpstring = _("Network UPS Tools");
-
- // TRANSLATORS: Description of a Service (rpm: nut), used as a common label or an item in table
- tmpstring = _("Opens ports for remote UPS signalling for Network UPS Tools.");
-
- // TRANSLATORS: Name of Service (rpm: openldap), can be used as check box, item in multiple selection box...
- tmpstring = _("OpenLDAP Server");
-
- // TRANSLATORS: Description of a Service (rpm: openldap), used as a common label or an item in table
- tmpstring = _("Opens ports for the OpenLDAP Server (slapd).");
-
- // TRANSLATORS: Description of a Service (rpm: postfix), used as a common label or an item in table
- tmpstring = _("Firewall Configuration file for postfix");
-
- // TRANSLATORS: Name of Service (rpm: postgresql), can be used as check box, item in multiple selection box...
- tmpstring = _("PostgreSQL Server");
-
- // TRANSLATORS: Description of a Service (rpm: postgresql), used as a common label or an item in table
- tmpstring = _("Opens TCP port 5432 to allow remote connections to the PostgreSQL server.");
-
- // TRANSLATORS: Name of Service (rpm: pure-ftpd), can be used as check box, item in multiple selection box...
- tmpstring = _("pureftpd");
-
- // TRANSLATORS: Description of a Service (rpm: pure-ftpd), used as a common label or an item in table
- tmpstring = _("Opens ports for pureftpd with broadcast allowed.");
-
- // TRANSLATORS: Description of a Service (rpm: sendmail), used as a common label or an item in table
- tmpstring = _("Firewall Configuration file for postfix");
-
- // TRANSLATORS: Name of Service (rpm: squid), can be used as check box, item in multiple selection box...
- tmpstring = _("Squid Service");
-
- // TRANSLATORS: Description of a Service (rpm: squid), used as a common label or an item in table
- tmpstring = _("Opens ports for Squid");
-
- // TRANSLATORS: Name of Service (rpm: sshd), can be used as check box, item in multiple selection box...
- tmpstring = _("Secure Shell Server");
-
- // TRANSLATORS: Description of a Service (rpm: sshd), used as a common label or an item in table
- tmpstring = _("Open ports for Secure Shell Server");
-
- // TRANSLATORS: Name of Service (rpm: svnserve), can be used as check box, item in multiple selection box...
- tmpstring = _("svnserve");
-
- // TRANSLATORS: Description of a Service (rpm: svnserve), used as a common label or an item in table
- tmpstring = _("Open ports for svnserve");
-
- // TRANSLATORS: Name of Service (rpm: talkd), can be used as check box, item in multiple selection box...
- tmpstring = _("Talk Server");
-
- // TRANSLATORS: Description of a Service (rpm: talkd), used as a common label or an item in table
- tmpstring = _("Open ports for Talk Server");
-
- // TRANSLATORS: Name of Service (rpm: tetrinet-server), can be used as check box, item in multiple selection box...
- tmpstring = _("Tetrinet Server");
-
- // TRANSLATORS: Description of a Service (rpm: tetrinet-server), used as a common label or an item in table
- tmpstring = _("Opens ports in firewall to make possible to connect clients to your server. ");
-
- // TRANSLATORS: Name of Service (rpm: vnc-httpd), can be used as check box, item in multiple selection box...
- tmpstring = _("VNC mini-HTTP server");
-
- // TRANSLATORS: Description of a Service (rpm: vnc-httpd), used as a common label or an item in table
- tmpstring = _("Opens the VNC HTTP ports so that browsers can connect.");
-
- // TRANSLATORS: Name of Service (rpm: vnc-server), can be used as check box, item in multiple selection box...
- tmpstring = _("VNC");
-
- // TRANSLATORS: Description of a Service (rpm: vnc-server), used as a common label or an item in table
- tmpstring = _("Opens VNC server ports so that viewers can connect.");
-
- // TRANSLATORS: Name of Service (rpm: vsftpd), can be used as check box, item in multiple selection box...
- tmpstring = _("vsftpd Server");
-
- // TRANSLATORS: Description of a Service (rpm: vsftpd), used as a common label or an item in table
- tmpstring = _("Opens ports for vsftpd Server.");
-
- // TRANSLATORS: Name of Service (rpm: xntp), can be used as check box, item in multiple selection box...
- tmpstring = _("xntp Server");
-
- // TRANSLATORS: Description of a Service (rpm: xntp), used as a common label or an item in table
- tmpstring = _("Opens ports for xntp.");
-
- // TRANSLATORS: Name of Service (rpm: ypbind), can be used as check box, item in multiple selection box...
- tmpstring = _("NIS Client");
-
- // TRANSLATORS: Description of a Service (rpm: ypbind), used as a common label or an item in table
- tmpstring = _("The ypbind daemon binds NIS clients to an NIS domain");
-
- // TRANSLATORS: Name of Service (rpm: ypserv), can be used as check box, item in multiple selection box...
- tmpstring = _("NIS Server");
-
- // TRANSLATORS: Description of a Service (rpm: ypserv), used as a common label or an item in table
- tmpstring = _("Configuration for a NIS master/slave server");
-
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/system/src/FileChanges.ycp new/yast2-2.16.35/library/system/src/FileChanges.ycp
--- old/yast2-2.16.34/library/system/src/FileChanges.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.16.35/library/system/src/FileChanges.ycp 2008-03-12 16:20:22.000000000 +0100
@@ -0,0 +1,167 @@
+/**
+ * File: modules/FileChanges.ycp
+ * Module: yast2
+ * Summary: Detect if a configuratil file was changed
+ * Authors: Jiri Srain
+ *
+ * Support routines for detecting changes of configuration files being done
+ * externally (not by YaST) to prevent the changes from being lost because
+ * of YaST not handling the configuration files correctly (eg. removing
+ * comments in some cases, changing order of options,...)
+ *
+ * Warns user if such change is detected.
+ *
+ * Usage:
+ * Before reading the configuration file:
+ * call boolean CheckFiles (list<string>) with all files. If any of them
+ * is detected to be changed, YaST asks a popup for you.
+ * alternatively use boolean FileChanged (string) for each file (does not
+ * ask any question, immediatelly returns status of the file
+ *
+ * After writing the configuraiton file:
+ * call void StoreFileCheckSum (string) for each file to store recent
+ * checksum. YaST will use this checksum next time checking.
+ *
+ */
+
+{
+
+module "FileChanges";
+
+textdomain "base";
+
+import "Mode";
+import "Popup";
+
+string data_file = "/var/lib/YaST2/file_checksums.ycp";
+
+map file_checksums = $[];
+
+/**
+ * Read the data file containing file checksums
+ */
+void ReadSettings () {
+ if ((integer)SCR::Read (.target.size, data_file) <= 0)
+ {
+ file_checksums = $[];
+ return;
+ }
+ file_checksums = (map)SCR::Read (.target.ycp, data_file);
+ if (file_checksums == nil)
+ file_checksums = $[];
+}
+
+/**
+ * Write the data file containing checksums
+ */
+void WriteSettings () {
+ SCR::Write (.target.ycp, data_file, file_checksums);
+}
+
+/**
+ * Compute the checksum of a file
+ * @param file string the file to compute checksum of
+ * @return string the checksum
+ */
+string ComputeFileChecksum (string file) {
+ string cmd = sformat ("/usr/bin/md5sum %1", file);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ // note: it also contains file name, but since it is only to be compared
+ // it does not matter
+ string sum = out["stdout"]:"";
+ return sum;
+}
+
+/**
+ * Check if file was modified compared to the one distributed
+ * with the RPM package
+ * @param file string the file to check
+ * @return boolean true of was changed
+ */
+boolean FileChangedFromPackage (string file) {
+ string cmd = sformat ("/bin/rpm -qf %1", file);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ string package = out["stdout"]:"";
+ y2milestone ("Package owning %1: %2", file, package);
+ if (package == "")
+ return false;
+ // FIXME: /bin/xx finds also /usr/bin/xx
+ cmd = sformat ("rpm -V %1 |grep %2", package, file);
+ out = (map)SCR::Execute (.target.bash_output, cmd);
+ string changes = out["stdout"]:"";
+ y2milestone ("File possibly changed: %1", changes);
+ list<string> lines = splitstring (changes, "\n");
+ boolean changed = false;
+ foreach (string line, lines, {
+ if (regexpmatch (line, "^S"))
+ changed = true;
+ if (regexpmatch (line, "^..5"))
+ changed = true;
+ if (regexpmatch (line, "^.......T"))
+ changed = true;
+ });
+ return changed;
+}
+
+/**
+ * Check if a file was modified externally (without YaST)
+ * @param file string boolean the file to check
+ * @return boolean true if was changed externally
+ */
+global boolean FileChanged (string file) {
+ // when generating AutoYaST configuration, they are not written back
+ if (Mode::config ())
+ return false;
+ ReadSettings ();
+ boolean ret = false;
+ if (haskey (file_checksums, file))
+ {
+ y2milestone ("Comparing file %1 to stored checksum", file);
+ string sum = ComputeFileChecksum (file);
+ ret = ! (sum == file_checksums[file]:"");
+ }
+ else
+ {
+ y2milestone ("Comparing file %1 to RPM database", file);
+ ret = FileChangedFromPackage (file);
+ }
+ y2milestone ("File differs: %1", ret);
+ return ret;
+}
+
+/**
+ * Store checksum of a file to the store
+ * @param file string filename to compute and store
+ */
+global void StoreFileCheckSum (string file) {
+ ReadSettings ();
+ string sum = ComputeFileChecksum (file);
+ file_checksums[file] = sum;
+ WriteSettings ();
+}
+
+/**
+ * Check files if any of them were changed
+ * Issue a question whether to continue if some were chaned
+ * @param files a list of files to check
+ * @return boolean true if either none was changed or user agreed
+ * to continue
+ */
+global boolean CheckFiles (list<string> files) {
+ files = filter (string f, files, { return FileChanged (f); });
+ if (size (files) > 0)
+ {
+ // Continue/Cancel question, %1 is a file name
+ string msg = _("File %1 has been changed manually.
+YaST might lose some of the changes");
+ if (size (files) > 1)
+ // Continue/Cancel question, %1 is a coma separated list of file names
+ msg = _("Files %1 have been changed manually.
+YaST might lose some of the changes");
+ msg = sformat (msg, mergestring (files, ", "));
+ return Popup::ContinueCancel (msg);
+ }
+ return true;
+}
+
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/system/src/test_kernel.ycp new/yast2-2.16.35/library/system/src/test_kernel.ycp
--- old/yast2-2.16.34/library/system/src/test_kernel.ycp 2007-08-30 11:13:45.000000000 +0200
+++ new/yast2-2.16.35/library/system/src/test_kernel.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-{
-
- import "Kernel";
- import "PackageSystem";
- import "Mode";
-
- PackageSystem::EnsureTargetInit();
- PackageSystem::EnsureSourceInit();
-
- y2internal("Kernel packages: %1", Kernel::GetPackages());
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/system/testsuite/tests/filechanges.out new/yast2-2.16.35/library/system/testsuite/tests/filechanges.out
--- old/yast2-2.16.34/library/system/testsuite/tests/filechanges.out 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.16.35/library/system/testsuite/tests/filechanges.out 2008-03-12 16:20:22.000000000 +0100
@@ -0,0 +1,3 @@
+Return true
+Return true
+Return false
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/library/system/testsuite/tests/filechanges.ycp new/yast2-2.16.35/library/system/testsuite/tests/filechanges.ycp
--- old/yast2-2.16.34/library/system/testsuite/tests/filechanges.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.16.35/library/system/testsuite/tests/filechanges.ycp 2008-03-12 16:20:22.000000000 +0100
@@ -0,0 +1,73 @@
+/**
+ * File:
+ * filechanges.ycp
+ *
+ * Module:
+ * Base
+ *
+ * Summary:
+ * testsuite for filechanges module
+ *
+ * Authors:
+ * Jiri Srain
+ *
+ * $Id: kernel.ycp 26253 2005-11-22 14:59:29Z lslezak $
+ *
+ */
+
+// testedfiles: Kernel.ycp Testsuite.ycp
+
+{
+ include "testsuite.ycp";
+
+ // minimal "don't care" SCR data to work with the constructor
+ map READ = $[
+ "target" : $[
+ "string" : "",
+ "tmpdir" : "/tmp",
+ "size" : 5,
+ "ycp" : $[
+ ],
+ ],
+ ];
+ map WRITE = $[];
+ list EXECL = [ $[
+ "target" : $[
+ "bash_output" : $[
+ "exit" : "0",
+ "stdout" : "ntp.rpm",
+ ],
+ ],
+ ],
+ $[
+ "target" : $[
+ "bash_output" : $[
+ "exit" : "0",
+ "stdout" : "S.?....T /etc/ntp.conf
+..?..... c /var/lib/ntp/etc/ntp.conf.iburst",
+ ],
+ ],
+ ],
+ ];
+
+ TESTSUITE_INIT ([READ, $[], $[]], 0);
+
+ import "FileChanges";
+ import "Mode";
+
+ Mode::SetTest ("testsuite");
+ TEST (``(FileChanges::FileChanged ("/etc/ntp.conf")), [READ, WRITE, EXECL], nil);
+ READ["target", "ycp", "/etc/ntp.conf"] = "incorrect checksum";
+ map EXEC = $[
+ "target" : $[
+ "bash_output" : $[
+ "exit" : "0",
+ "stdout" : "f210720e1362615ac0ecc544b35abb73 /etc/ntp.conf",
+ ],
+ ],
+ ];
+
+ TEST (``(FileChanges::FileChanged ("/etc/ntp.conf")), [READ, WRITE, EXEC], nil);
+ READ["target", "ycp", "/etc/ntp.conf"] = "f210720e1362615ac0ecc544b35abb73 /etc/ntp.conf";
+ TEST (``(FileChanges::FileChanged ("/etc/ntp.conf")), [READ, WRITE, EXEC], nil);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.34/VERSION new/yast2-2.16.35/VERSION
--- old/yast2-2.16.34/VERSION 2008-03-11 13:01:21.000000000 +0100
+++ new/yast2-2.16.35/VERSION 2008-03-12 17:21:10.000000000 +0100
@@ -1 +1 @@
-2.16.34
+2.16.35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org