Hello community,
here is the log from the commit of package yast2-core
checked in at Wed Mar 5 21:44:59 CET 2008.
--------
--- yast2-core/yast2-core.changes 2008-03-04 13:31:11.000000000 +0100
+++ yast2-core/yast2-core.changes 2008-03-05 12:21:17.000000000 +0100
@@ -1,0 +2,8 @@
+Wed Mar 5 09:58:00 CET 2008 - locilka@suse.cz
+
+- Extended .process agent with 'buffer_empty' function that returns
+ whether the stdout buffer is empty (needed for backup).
+- Adjusted and fixed process agent testsuite.
+- 2.16.40
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.16.39.tar.bz2
New:
----
yast2-core-2.16.40.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.u24936/_old 2008-03-05 21:41:11.000000000 +0100
+++ /var/tmp/diff_new_pack.u24936/_new 2008-03-05 21:41:11.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.16.39)
+# spec file for package yast2-core (Version 2.16.40)
#
# 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-core
-Version: 2.16.39
+Version: 2.16.40
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.16.39.tar.bz2
+Source0: yast2-core-2.16.40.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -83,7 +83,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.16.39
+%setup -n yast2-core-2.16.40
%build
%{prefix}/bin/y2tool y2autoconf
@@ -160,6 +160,11 @@
%doc %{prefix}/share/doc/packages/yast2-core
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Wed Mar 05 2008 locilka@suse.cz
+- Extended .process agent with 'buffer_empty' function that returns
+ whether the stdout buffer is empty (needed for backup).
+- Adjusted and fixed process agent testsuite.
+- 2.16.40
* Tue Mar 04 2008 mvidner@suse.cz
- Do not stop registering agents after UnregisterAgent (bnc#365116).
- 2.16.39
++++++ yast2-core-2.16.39.tar.bz2 -> yast2-core-2.16.40.tar.bz2 ++++++
++++ 14475 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-core-2.16.39/agent-modules/testsuite/tests/dir.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/dir.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/dir.scr 2008-02-08 14:18:50.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/dir.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/dir.in.test")
-)
-
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-core-2.16.39/agent-modules/testsuite/tests/missing.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/missing.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/missing.scr 2008-02-08 14:18:48.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/missing.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/missing.in.test")
-)
-
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-core-2.16.39/agent-modules/testsuite/tests/read1.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/read1.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/read1.scr 2008-02-08 14:18:48.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/read1.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/read1.in.test")
-)
-
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-core-2.16.39/agent-modules/testsuite/tests/write1.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/write1.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/write1.scr 2008-02-08 14:18:49.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/write1.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write1.in.test")
-)
-
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-core-2.16.39/agent-modules/testsuite/tests/write2.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/write2.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/write2.scr 2008-02-08 14:18:50.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/write2.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write2.in.test")
-)
-
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-core-2.16.39/agent-modules/testsuite/tests/write3.scr new/yast2-core-2.16.40/agent-modules/testsuite/tests/write3.scr
--- old/yast2-core-2.16.39/agent-modules/testsuite/tests/write3.scr 2008-02-08 14:18:48.000000000 +0100
+++ new/yast2-core-2.16.40/agent-modules/testsuite/tests/write3.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-.
-
-`ag_modules(
- `ModulesConf("tests/write3.in.test")
-)
-
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-core-2.16.39/agent-process/conf/process.scr new/yast2-core-2.16.40/agent-process/conf/process.scr
--- old/yast2-core-2.16.39/agent-process/conf/process.scr 2008-02-20 07:46:16.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/conf/process.scr 2008-03-05 09:56:46.000000000 +0100
@@ -48,11 +48,18 @@
* (nil)
*
* // read complete output
+ * // check whether the buffer (output) is empty
+ * // (even if process is dead, buffer might contain something)
* `Write(.process, 14900,"the first line\nthe second line\n")
* (true)
+ * // buffer is not empty
+ * `Read (.process.buffer_empty, 14900)
+ * (false)
* `Read(.process.read, 14900)
* ("the first line\nthe second line\n")
- *
+ * // buffer is empty after .read
+ * `Read (.process.buffer_empty, 14900)
+ * (true)
* // close input/output
* `Read(.process.running, 14900)
* (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-core-2.16.39/agent-process/doc/autodocs/ag_process-builtins.html new/yast2-core-2.16.40/agent-process/doc/autodocs/ag_process-builtins.html
--- old/yast2-core-2.16.39/agent-process/doc/autodocs/ag_process-builtins.html 2008-03-04 13:33:41.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/doc/autodocs/ag_process-builtins.html 2008-03-05 10:00:18.000000000 +0100
@@ -19,6 +19,13 @@
<p>
+<table border=0 cellspacing=0 cellpadding=1 width='100%' bgcolor='#f96500'><tr><td><table border=0 cellspacing=0 cellpadding=3 width='100%' bgcolor='#ffc080'><tr><td><font size='+1'><tt><b><a name='Read_process_buffer_empty_integer_id_'>Read (.process.buffer_empty, integer id)</a> <font color='#606060'>-></font> <font color='#c05000'>boolean</font></b></tt></font></td></tr></table></td></tr></table>
+<p>
+Returns boolean whether the stdout buffer is empty, if buffer is not empty, false is returned.
+<p>Example:<pre>Read (.process.buffer_empty, 12345) -> false</pre>
+
+
+<p>
<table border=0 cellspacing=0 cellpadding=1 width='100%' bgcolor='#f96500'><tr><td><table border=0 cellspacing=0 cellpadding=3 width='100%' bgcolor='#ffc080'><tr><td><font size='+1'><tt><b><a name='Execute_process_close_integer_id_'>Execute (.process.close, integer id)</a> <font color='#606060'>-></font> <font color='#c05000'>integer</font></b></tt></font></td></tr></table></td></tr></table>
<p>
Close input/output of the process and wait until the process ends
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-core-2.16.39/agent-process/src/ProcessAgent.cc new/yast2-core-2.16.40/agent-process/src/ProcessAgent.cc
--- old/yast2-core-2.16.39/agent-process/src/ProcessAgent.cc 2008-03-04 10:56:12.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/src/ProcessAgent.cc 2008-03-04 18:35:13.000000000 +0100
@@ -227,6 +227,16 @@
return YCPInteger(proc->second->close());
}
}
+ else if (cmd == "buffer_empty")
+ {
+ /**
+ * @builtin Read (.process.buffer_empty, integer id) -> boolean
+ * Returns boolean whether the stdout buffer is empty, if buffer is not empty, false is returned.
+ *
+ * @example Read (.process.buffer_empty, 12345) -> false
+ */
+ return YCPBoolean (proc->second->anyLineInStdout());
+ }
y2error("Wrong path '%s' in Read().", path->toString().c_str());
return YCPNull();
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-core-2.16.39/agent-process/src/Process.cc new/yast2-core-2.16.40/agent-process/src/Process.cc
--- old/yast2-core-2.16.39/agent-process/src/Process.cc 2008-03-04 10:56:12.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/src/Process.cc 2008-03-05 10:21:09.000000000 +0100
@@ -64,15 +64,28 @@
return ExternalProgram::kill();
}
-// read a line from stdout
-std::string Process::readLine()
+void Process::BufferNewStdoutLines ()
{
const std::string new_output = receiveUpto('\n');
stdout_buffer += new_output;
+}
+
+// read a line from stdout
+std::string Process::readLine()
+{
+ BufferNewStdoutLines();
return GetLineFromBuffer(stdout_buffer);
}
+// return whether stdout buffer contains any (finished) line
+bool Process::anyLineInStdout()
+{
+ BufferNewStdoutLines();
+
+ return IsAnyLineInBuffer(stdout_buffer);
+}
+
void Process::readStdoutToBuffer()
{
const size_t b_size = 4096;
@@ -144,6 +157,12 @@
return std::string();
}
+// returns whether the buffer is empty
+bool Process::IsAnyLineInBuffer(const std::string &buffer)
+{
+ return buffer.empty();
+}
+
// read a line from stderr
std::string Process::readErrLine()
{
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-core-2.16.39/agent-process/src/Process.h new/yast2-core-2.16.40/agent-process/src/Process.h
--- old/yast2-core-2.16.39/agent-process/src/Process.h 2008-03-04 10:56:12.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/src/Process.h 2008-03-05 10:21:22.000000000 +0100
@@ -60,6 +60,13 @@
// a helper function
std::string GetLineFromBuffer(std::string &buffer);
+ // a helper function
+ // reads the new stdout lines and adds them to stdout buffer
+ void BufferNewStdoutLines();
+
+ // checks emptines of the stdout buffer
+ bool IsAnyLineInBuffer(const std::string &buffer);
+
public:
/**
@@ -134,6 +141,10 @@
*/
void readStderrToBuffer();
+ /**
+ * Read whether there are some buffered lines
+ */
+ bool anyLineInStdout();
};
#endif // Process_h
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-core-2.16.39/agent-process/testsuite/tests/invalid_paths.err new/yast2-core-2.16.40/agent-process/testsuite/tests/invalid_paths.err
--- old/yast2-core-2.16.39/agent-process/testsuite/tests/invalid_paths.err 2008-03-04 10:56:13.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/testsuite/tests/invalid_paths.err 2008-03-05 11:13:14.000000000 +0100
@@ -1,6 +1,6 @@
-[agent-process] ProcessAgent.cc(Dir):80 Wrong path '.non_existing_path' in Dir().
-[agent-process] ProcessAgent.cc(Read):107 ID of the process is missing
-[agent-process] ProcessAgent.cc(Write):243 Unsupported path in Write(): .non_existing_path
-[agent-process] ProcessAgent.cc(Execute):460 ID of the process is missing
-[agent-process] ProcessAgent.cc(Read):119 Process '123' not found
-[agent-process] ProcessAgent.cc(Write):261 Process '123' not found
+[agent-process] ProcessAgent.cc(Dir) Wrong path '.non_existing_path' in Dir().
+[agent-process] ProcessAgent.cc(Read) ID of the process is missing
+[agent-process] ProcessAgent.cc(Write) Unsupported path in Write(): .non_existing_path
+[agent-process] ProcessAgent.cc(Execute) ID of the process is missing
+[agent-process] ProcessAgent.cc(Read) Process '123' not found
+[agent-process] ProcessAgent.cc(Write) Process '123' not found
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-core-2.16.39/agent-process/testsuite/tests/invalid_values.err new/yast2-core-2.16.40/agent-process/testsuite/tests/invalid_values.err
--- old/yast2-core-2.16.39/agent-process/testsuite/tests/invalid_values.err 2008-03-04 10:56:12.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/testsuite/tests/invalid_values.err 2008-03-05 11:13:14.000000000 +0100
@@ -1,2 +1,2 @@
-[agent-process] ProcessAgent.cc(Execute):348 tty option '"invalid"' is not a boolean value
-[agent-process] ProcessAgent.cc(Execute):348 tty option '"invalid"' is not a boolean value
+[agent-process] ProcessAgent.cc(Execute) tty option '"invalid"' is not a boolean value
+[agent-process] ProcessAgent.cc(Execute) tty option '"invalid"' is not a boolean value
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-core-2.16.39/agent-process/testsuite/tests/runtest.sh new/yast2-core-2.16.40/agent-process/testsuite/tests/runtest.sh
--- old/yast2-core-2.16.39/agent-process/testsuite/tests/runtest.sh 2008-02-20 11:08:11.000000000 +0100
+++ new/yast2-core-2.16.40/agent-process/testsuite/tests/runtest.sh 2008-03-05 11:13:07.000000000 +0100
@@ -7,4 +7,10 @@
export Y2DEBUGSHELL=1
# ignore also milestones (they are not constant and logged by liby2util - cannot be simply turned off)
-(./run_ag_process -l - $1 >$2) 2>&1 | fgrep -v -e " <0> " -e " <1> " | grep -v "^$" | sed 's/^....-..-.. ..:..:.. [^)]*) //g' > $3
+# ignore also line numbers (any change in the core might make the testsuite fail)
+(./run_ag_process -l - $1 >$2) 2>&1 | \
+ fgrep -v -e " <0> " -e " <1> " | \
+ grep -v "^$" | \
+ sed 's/^....-..-.. ..:..:.. [^)]*) //g' | \
+ sed 's/^\(\[[^]]\+\] [^(]\+([^)]\+)\):[0-9]\+ \(.*\)/\1 \2/g' \
+ > $3
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-core-2.16.39/configure.in new/yast2-core-2.16.40/configure.in
--- old/yast2-core-2.16.39/configure.in 2008-03-04 13:31:38.000000000 +0100
+++ new/yast2-core-2.16.40/configure.in 2008-03-05 10:23:53.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2-core
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-core, 2.16.39, http://bugs.opensuse.org/, yast2-core)
+AC_INIT(yast2-core, 2.16.40, http://bugs.opensuse.org/, yast2-core)
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.39"
+VERSION="2.16.40"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner "
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-core-2.16.39/VERSION new/yast2-core-2.16.40/VERSION
--- old/yast2-core-2.16.39/VERSION 2008-03-04 13:30:07.000000000 +0100
+++ new/yast2-core-2.16.40/VERSION 2008-03-05 09:59:49.000000000 +0100
@@ -1 +1 @@
-2.16.39
+2.16.40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org