Hello community,
here is the log from the commit of package yast2-core
checked in at Wed Feb 20 17:31:46 CET 2008.
--------
--- yast2-core/yast2-core.changes 2008-02-20 09:31:25.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2008-02-20 17:28:45.000000000 +0100
@@ -1,0 +2,23 @@
+Wed Feb 20 17:28:30 CET 2008 - coolo@suse.de
+
+- fix dummy UIs for test cases in yast modules
+
+-------------------------------------------------------------------
+Wed Feb 20 16:14:36 CET 2008 - lslezak@suse.cz
+
+- .process agent - fixed reading large stdout/stderr output (added
+ a testsuite), removed .buffer path (output reading is now part
+ of .running)
+
+-------------------------------------------------------------------
+Wed Feb 20 11:42:34 CET 2008 - sh@suse.de
+
+- Accept `opt(`immediate) for tree widget
+- V 2.16.36
+
+-------------------------------------------------------------------
+Wed Feb 20 11:38:25 CET 2008 - mvidner@suse.cz
+
+- If the log directory does not exist, create it.
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.16.35.tar.bz2
New:
----
yast2-core-2.16.36.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.V15954/_old 2008-02-20 17:31:30.000000000 +0100
+++ /var/tmp/diff_new_pack.V15954/_new 2008-02-20 17:31:30.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.16.35)
+# spec file for package yast2-core (Version 2.16.36)
#
# 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.35
+Version: 2.16.36
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.16.35.tar.bz2
+Source0: yast2-core-2.16.36.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -86,7 +86,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.16.35
+%setup -n yast2-core-2.16.36
%build
%{prefix}/bin/y2tool y2autoconf
@@ -163,6 +163,17 @@
%doc %{prefix}/share/doc/packages/yast2-core
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Wed Feb 20 2008 coolo@suse.de
+- fix dummy UIs for test cases in yast modules
+* Wed Feb 20 2008 lslezak@suse.cz
+- .process agent - fixed reading large stdout/stderr output (added
+ a testsuite), removed .buffer path (output reading is now part
+ of .running)
+* Wed Feb 20 2008 sh@suse.de
+- Accept `opt(`immediate) for tree widget
+- V 2.16.36
+* Wed Feb 20 2008 mvidner@suse.cz
+- If the log directory does not exist, create it.
* Wed Feb 20 2008 mvidner@suse.cz
- Fixed linking of libpy2UI.
* Mon Feb 18 2008 sh@suse.de
++++++ yast2-core-2.16.35.tar.bz2 -> yast2-core-2.16.36.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/doc/autodocs/ag_process-builtins.html new/yast2-core-2.16.36/agent-process/doc/autodocs/ag_process-builtins.html
--- old/yast2-core-2.16.35/agent-process/doc/autodocs/ag_process-builtins.html 2008-02-20 08:52:34.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/doc/autodocs/ag_process-builtins.html 2008-02-20 16:48:50.000000000 +0100
@@ -19,15 +19,6 @@
<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_buffer_integer_id_'>Execute (.process.buffer, integer id)</a> <font color='#606060'>-></font> <font color='#c05000'>boolean</font></b></tt></font></td></tr></table></td></tr></table>
-<p>
-Read stdout and stderr of the process to unblock it when there is full buffer and the process is stopped.
-This function (or .read and .read_stderr) should be called regularly to ensure that the process
-is not blocked and can run.
-<p>Example:<pre>Execute(.process.buffer, 12345) -> true</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 old/yast2-core-2.16.35/agent-process/src/ProcessAgent.cc new/yast2-core-2.16.36/agent-process/src/ProcessAgent.cc
--- old/yast2-core-2.16.35/agent-process/src/ProcessAgent.cc 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/src/ProcessAgent.cc 2008-02-20 16:44:17.000000000 +0100
@@ -129,6 +129,11 @@
*
* @example Read (.process.running, 12345) -> true
*/
+
+ // read output to unblock the process
+ proc->second->readStdoutToBuffer();
+ proc->second->readStderrToBuffer();
+
return YCPBoolean(proc->second->running());
}
// handler for "pid" path
@@ -468,21 +473,7 @@
return YCPNull();
}
- if (pth == "buffer")
- {
- /**
- * @builtin Execute(.process.buffer, integer id) -> boolean
- * Read stdout and stderr of the process to unblock it when there is full buffer and the process is stopped.
- * This function (or .read and .read_stderr) should be called regularly to ensure that the process
- * is not blocked and can run.
- *
- * @example Execute(.process.buffer, 12345) -> true
- */
- y2milestone("Reading %d output to buffers...", id);
- proc->second->readToBuffers();
- return YCPBoolean(true);
- }
- else if (pth == "kill")
+ if (pth == "kill")
{
/**
* @builtin Execute(.process.kill, integer id, integer signal) -> boolean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/src/Process.cc new/yast2-core-2.16.36/agent-process/src/Process.cc
--- old/yast2-core-2.16.35/agent-process/src/Process.cc 2008-02-20 07:50:15.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/src/Process.cc 2008-02-20 16:44:17.000000000 +0100
@@ -77,9 +77,14 @@
{
const size_t b_size = 4096;
char buffer[b_size];
+ size_t read;
- const size_t read = receive(buffer, b_size);
- stdout_buffer += std::string(buffer, read);
+ do
+ {
+ read = receive(buffer, b_size);
+ stdout_buffer.append(buffer, read);
+ }
+ while(read == b_size);
}
// read stdout and return the data
@@ -95,21 +100,28 @@
}
// read data from a fd to a buffer
-void Process::readToBuffer(int fd, std::string &buffer_str)
+void Process::readStderrToBuffer()
{
- const size_t b_size = 4096;
- char buffer[b_size];
+ if (!stderr_output)
+ {
+ ERR << "stderr output is not open!" << std::endl;
+ return;
+ }
- ssize_t len = ::read(fd, buffer, b_size);
+ const int b_size = 4096;
+ char buffer[b_size];
+ int len;
- // no input so far
- if (len == -1)
+ do
{
- len = 0;
- }
+ len = ::fread(buffer, 1, b_size, stderr_output);
- const std::string new_output(buffer, len);
- buffer_str += new_output;
+ if (len > 0)
+ {
+ stderr_buffer.append(buffer, len);
+ }
+ }
+ while(len == b_size);
}
// cut off the first line from a buffer and return it
@@ -135,27 +147,20 @@
// read a line from stderr
std::string Process::readErrLine()
{
- readToBuffer(stderr_pipes[0], stderr_buffer);
+ readStderrToBuffer();
return GetLineFromBuffer(stderr_buffer);
}
-void Process::readToBuffers()
-{
- // read from stderr to the buffer
- readToBuffer(stderr_pipes[0], stderr_buffer);
-
- readStdoutToBuffer();
-}
-
// read data from stderr
std::string Process::readErr()
{
// read from stderr to the buffer
- readToBuffer(stderr_pipes[0], stderr_buffer);
+ readStderrToBuffer();
// return the buffer and clear it
std::string ret(stderr_buffer);
+
stderr_buffer.clear();
return ret;
@@ -187,6 +192,8 @@
// create a pipe for stderr output
int Process::create_stderr_pipes()
{
+ int stderr_pipes[2];
+
// create a pair of pipes
if (pipe(stderr_pipes) != 0)
{
@@ -196,7 +203,8 @@
// set the stderr pipe to non-blocking mode
UnblockFD(stderr_pipes[0]);
- UnblockFD(stderr_pipes[1]);
+
+ stderr_output = ::fdopen(stderr_pipes[0], "r");
// return fd for writing
return stderr_pipes[1];
@@ -204,8 +212,13 @@
int Process::closeAll()
{
- // close stderr pipe
- ::close(stderr_pipes[0]);
+ if (!stderr_output)
+ {
+ // close stderr pipe
+ ::fclose(stderr_output);
+
+ stderr_output = NULL;
+ }
return ExternalProgram::close();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/src/Process.h new/yast2-core-2.16.36/agent-process/src/Process.h
--- old/yast2-core-2.16.35/agent-process/src/Process.h 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/src/Process.h 2008-02-20 16:44:17.000000000 +0100
@@ -45,7 +45,8 @@
std::string stdout_buffer; // buffer for stdout
std::string stderr_buffer; // buffer for stderr
- int stderr_pipes[2]; // a pipe for stderr output
+
+ FILE *stderr_output;
private:
@@ -59,11 +60,6 @@
// a helper function
std::string GetLineFromBuffer(std::string &buffer);
- // a helper function
- void readToBuffer(int fd, std::string &buffer_str);
-
- void readStdoutToBuffer();
-
public:
/**
@@ -76,7 +72,7 @@
*/
Process(const std::string &commandline, bool use_pty = false, bool default_locale = false)
: ExternalProgram(commandline, Stderr_To_FileDesc,
- use_pty, create_stderr_pipes(), default_locale)
+ use_pty, create_stderr_pipes(), default_locale), stderr_output(NULL)
{}
/**
@@ -124,11 +120,20 @@
std::string readErr();
/**
- * Read stdout and stderr of the process to buffers to unblock it
+ * Close all input/output filedescriptors
*/
- void readToBuffers();
-
int closeAll();
+
+ /**
+ * Read stdout to the internal buffer (can unblock the process)
+ */
+ void readStdoutToBuffer();
+
+ /**
+ * Read stderr to the internal buffer (can unblock the process)
+ */
+ void readStderrToBuffer();
+
};
#endif // Process_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/ag_process.test/ag_process.exp new/yast2-core-2.16.36/agent-process/testsuite/ag_process.test/ag_process.exp
--- old/yast2-core-2.16.35/agent-process/testsuite/ag_process.test/ag_process.exp 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/ag_process.test/ag_process.exp 2008-02-20 16:44:17.000000000 +0100
@@ -4,7 +4,7 @@
#
# get all files matching tests/*.ycp
-set filenames [glob $srcdir/tests/*.ycp]
+set filenames [lsort [glob $srcdir/tests/*.ycp]]
# foreach file, call ycp-run (from testsuite/lib)
foreach file $filenames { ycp-run $file }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/config/unix.exp new/yast2-core-2.16.36/agent-process/testsuite/config/unix.exp
--- old/yast2-core-2.16.35/agent-process/testsuite/config/unix.exp 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/config/unix.exp 2008-02-20 16:44:17.000000000 +0100
@@ -1,5 +1,5 @@
load_lib "ag_process_init.exp"
-proc ag_system_exit {} {}
-proc ag_system_version {} {}
+proc ag_process_exit {} {}
+proc ag_process_version {} {}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/tests/invalid_paths.err new/yast2-core-2.16.36/agent-process/testsuite/tests/invalid_paths.err
--- old/yast2-core-2.16.35/agent-process/testsuite/tests/invalid_paths.err 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/tests/invalid_paths.err 2008-02-20 16:44:17.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):238 Unsupported path in Write(): .non_existing_path
-[agent-process] ProcessAgent.cc(Execute):455 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):256 Process '123' not found
+[agent-process] ProcessAgent.cc(Write):261 Process '123' not found
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/tests/invalid_values.err new/yast2-core-2.16.36/agent-process/testsuite/tests/invalid_values.err
--- old/yast2-core-2.16.35/agent-process/testsuite/tests/invalid_values.err 2008-02-15 12:06:36.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/tests/invalid_values.err 2008-02-20 16:44:17.000000000 +0100
@@ -1,2 +1,2 @@
-[agent-process] ProcessAgent.cc(Execute):343 tty option '"invalid"' is not a boolean value
-[agent-process] ProcessAgent.cc(Execute):343 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):348 tty option '"invalid"' is not a boolean value
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/tests/large_output.out new/yast2-core-2.16.36/agent-process/testsuite/tests/large_output.out
--- old/yast2-core-2.16.35/agent-process/testsuite/tests/large_output.out 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/tests/large_output.out 2008-02-20 16:44:17.000000000 +0100
@@ -0,0 +1,2 @@
+(144384)
+(144384)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agent-process/testsuite/tests/large_output.ycp new/yast2-core-2.16.36/agent-process/testsuite/tests/large_output.ycp
--- old/yast2-core-2.16.35/agent-process/testsuite/tests/large_output.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.16.36/agent-process/testsuite/tests/large_output.ycp 2008-02-20 16:44:17.000000000 +0100
@@ -0,0 +1,24 @@
+
+// check large stdout output (141k)
+// convert \0 to a printable character
+{
+ integer id = (integer)(SCR::Execute(.start_shell, "/bin/dd if=/dev/zero bs=1k count=141 | tr '\\0' 0"));
+
+ while(SCR::Read(.running, id) == true) sleep(20);
+
+ string out = (string)SCR::Read(.read, id);
+ return size(out);
+}
+
+// check large stderr output (141k)
+// convert \0 to a printable character
+{
+ integer id = (integer)(SCR::Execute(.start_shell,
+ // redirect dd status output from stderr to /dev/null (status contains non-constat writing speed)
+ "(/bin/dd if=/dev/zero bs=1k count=141 2> /dev/null) | tr '\\0' 0 1>&2"));
+
+ while(SCR::Read(.running, id) == true) sleep(20);
+
+ string out = (string)SCR::Read(.read_stderr, id);
+ return size(out);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.16.36/agents-perl/doc/ycp-pm-pod.html
--- old/yast2-core-2.16.35/agents-perl/doc/ycp-pm-pod.html 2007-11-23 11:13:55.000000000 +0100
+++ new/yast2-core-2.16.36/agents-perl/doc/ycp-pm-pod.html 2008-02-20 16:48:15.000000000 +0100
@@ -9,8 +9,10 @@
<body style="background-color: white">
-<p><a name="__index__"></a></p>
+
<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
<ul>
@@ -74,9 +76,11 @@
</ul>
</ul>
+
+<hr name="index" />
+</div>
<!-- INDEX END -->
-<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
@@ -100,31 +104,31 @@
<p>A PerlYCPValue cannot represent a term but only a term is allowed
to initialize an agent in a .scr file. Therefore <a href="#parseterm">ParseTerm</a> is provided.</p>
<dl>
-<dt><strong><a name="item_string_2c_integer_2c_boolean">string, integer, boolean</a></strong>
+<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong>
<dd>
<p>Stored as a scalar.</p>
</dd>
</li>
-<dt><strong><a name="item_list">list</a></strong>
+<dt><strong><a name="list" class="item">list</a></strong>
<dd>
<p>Stored as a reference to a list of PerlYCPValues.</p>
</dd>
</li>
-<dt><strong><a name="item_map">map</a></strong>
+<dt><strong><a name="map" class="item">map</a></strong>
<dd>
<p>Stored as a reference to a map of PerlYCPValues.</p>
</dd>
</li>
-<dt><strong><a name="item_path">path</a></strong>
+<dt><strong><a name="path" class="item">path</a></strong>
<dd>
-<p>Stored as a reference to a string (starting with a ``.'' as expected).</p>
+<p>Stored as a reference to a string (starting with a "." as expected).</p>
</dd>
</li>
-<dt><strong><a name="item_nil">nil (void)</a></strong>
+<dt><strong><a name="nil" class="item">nil (void)</a></strong>
<dd>
<p>Stored as an undef.</p>
@@ -141,7 +145,7 @@
<p>ParseComand $line</p>
<p><code>($command, $path, $arg) = ParseCommand ('Write (.moria.gate, "mellon")');</code></p>
<p>Parse a SCR command of the form Command (.some.path, optional_argument)</p>
-<p>Returns a three element list (``Command'', ``.some.path'', $argument)
+<p>Returns a three element list ("Command", ".some.path", $argument)
where the argument is a <a href="#perlycpvalue">PerlYCPValue</a> and will be undef
if it was not specified.
Note that the path is converted to a string.</p>
@@ -182,12 +186,12 @@
<p><code>Return (["arbitrarily", "complex", "data"]);</code></p>
<p>Sends a <a href="#perlycpvalue">PerlYCPValue</a> to the partner YCP component.</p>
<p>If there's just one argment, scalars are interpreted this way:
-``true'' or ``false'' are sent as
+"true" or "false" are sent as
booleans, integers or strings of digits are sent as integers, otherwise as
strings.
If a second argument exists and is true, all scalars are written as strings.
If a second argument exists and is false, all scalars are written as byteblocks.</p>
-<p>To send a list, call Return(\@list), not Return(@list).
+<p>To send a list, call <code>Return(\@list)</code>, not <code>Return(@list)</code>.
Similarly for a map. You can use references to anonymous lists [] and hashes {}.</p>
<p>The difference from <a href="#ycpreturn">ycpReturn</a> is that Return can return scalars directly,
strings are properly escaped if needeed and paths can be returned.</p>
@@ -200,9 +204,9 @@
and logging just works. In such case, you should not need to use ycp.pm at all.
Instead, <code>use YaST::YCP (":LOGGING")</code>.</p>
<p>The log output can now be redirected, which will be useful for test suites.
-If the first command-line option is ``-l'', the second argument is taken as
-the log file. A hyphen ``-'' designates standard output.</p>
-<p>Otherwise, <em>/var/log/YaST2/y2log</em> and <em>$HOME/.y2log</em> are tried, in that order.</p>
+If the first command-line option is "-l", the second argument is taken as
+the log file. A hyphen "-" designates standard output.</p>
+<p>Otherwise, <em class="file">/var/log/YaST2/y2log</em> and <em class="file">$HOME/.y2log</em> are tried, in that order.</p>
<p>
</p>
<h2><a name="y2debug">y2debug</a></h2>
@@ -212,7 +216,7 @@
y2error,
y2security,
y2internal</p>
-<p>Logs debug messages to <em>/var/log/YaST2/y2log</em> or <em>$HOME/.y2log</em></p>
+<p>Logs debug messages to <em class="file">/var/log/YaST2/y2log</em> or <em class="file">$HOME/.y2log</em></p>
<p>Note a <strong>semantic change</strong> in y2debug: now the environment variable
Y2DEBUG is honored so y2debug will not produce output unless this
variable is set. This is for compatibility with the logging system in libycp.</p>
@@ -227,11 +231,11 @@
<p>
</p>
<h2><a name="ycpargismap">ycpArgIsMap</a></h2>
-<p>Obsolete. Use (ref($arg) eq ``HASH'') instead.</p>
+<p>Obsolete. Use (ref($arg) eq "HASH") instead.</p>
<p>
</p>
<h2><a name="ycpargislist">ycpArgIsList</a></h2>
-<p>Obsolete. Use (ref($arg) eq ``ARRAY'') instead.</p>
+<p>Obsolete. Use (ref($arg) eq "ARRAY") instead.</p>
<p>
</p>
<h2><a name="ycpargisinteger">ycpArgIsInteger</a></h2>
@@ -247,7 +251,7 @@
<p>
</p>
<h2><a name="ycpargisnil">ycpArgIsNil</a></h2>
-<p>Obsolete. Use (ref($arg) eq ``SCALAR'' && $$arg eq ``nil'') instead.</p>
+<p>Obsolete. Use (ref($arg) eq "SCALAR" && $$arg eq "nil") instead.</p>
<p>
</p>
<h2><a name="ycpargisnone">ycpArgIsNone</a></h2>
@@ -255,23 +259,23 @@
<p>
</p>
<h2><a name="ycpcommandisdir">ycpCommandIsDir</a></h2>
-<p>Obsolete. Use ($command eq ``Dir'')</p>
+<p>Obsolete. Use ($command eq "Dir")</p>
<p>
</p>
<h2><a name="ycpcommandisread">ycpCommandIsRead</a></h2>
-<p>Obsolete. Use ($command eq ``Read'')</p>
+<p>Obsolete. Use ($command eq "Read")</p>
<p>
</p>
<h2><a name="ycpcommandiswrite">ycpCommandIsWrite</a></h2>
-<p>Obsolete. Use ($command eq ``Write'')</p>
+<p>Obsolete. Use ($command eq "Write")</p>
<p>
</p>
<h2><a name="ycpcommandisexecute">ycpCommandIsExecute</a></h2>
-<p>Obsolete. Use ($command eq ``Execute'')</p>
+<p>Obsolete. Use ($command eq "Execute")</p>
<p>
</p>
<h2><a name="ycpcommandisresult">ycpCommandIsResult</a></h2>
-<p>Obsolete. Use ($command eq ``result''), note the lowercase 'r'.</p>
+<p>Obsolete. Use ($command eq "result"), note the lowercase 'r'.</p>
<p>
</p>
<h2><a name="ycpgetcommand">ycpGetCommand</a></h2>
@@ -309,7 +313,7 @@
<p>
</p>
<h2><a name="ycpreturnskalarasboolean">ycpReturnSkalarAsBoolean</a></h2>
-<p>Obsolete. Use <a href="#return">Return</a>(``true'' or ``false'')</p>
+<p>Obsolete. Use <a href="#return">Return</a>("true" or "false")</p>
<p>
</p>
<h2><a name="ycpreturnskalarasstring">ycpReturnSkalarAsString</a></h2>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/configure new/yast2-core-2.16.36/configure
--- old/yast2-core-2.16.35/configure 2008-02-20 08:51:30.000000000 +0100
+++ new/yast2-core-2.16.36/configure 2008-02-20 16:44:47.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-core 2.16.35.
+# Generated by GNU Autoconf 2.61 for yast2-core 2.16.36.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-core'
PACKAGE_TARNAME='yast2-core'
-PACKAGE_VERSION='2.16.35'
-PACKAGE_STRING='yast2-core 2.16.35'
+PACKAGE_VERSION='2.16.36'
+PACKAGE_STRING='yast2-core 2.16.36'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1453,7 +1453,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-core 2.16.35 to adapt to many kinds of systems.
+\`configure' configures yast2-core 2.16.36 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1524,7 +1524,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-core 2.16.35:";;
+ short | recursive ) echo "Configuration of yast2-core 2.16.36:";;
esac
cat <<\_ACEOF
@@ -1631,7 +1631,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-core configure 2.16.35
+yast2-core configure 2.16.36
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1645,7 +1645,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-core $as_me 2.16.35, which was
+It was created by yast2-core $as_me 2.16.36, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2466,7 +2466,7 @@
# Define the identity of the package.
PACKAGE='yast2-core'
- VERSION='2.16.35'
+ VERSION='2.16.36'
cat >>confdefs.h <<_ACEOF
@@ -2694,7 +2694,7 @@
-VERSION="2.16.35"
+VERSION="2.16.36"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner "
@@ -23382,7 +23382,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-core $as_me 2.16.35, which was
+This file was extended by yast2-core $as_me 2.16.36, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23435,7 +23435,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-core config.status 2.16.35
+yast2-core config.status 2.16.36
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/configure.in new/yast2-core-2.16.36/configure.in
--- old/yast2-core-2.16.35/configure.in 2008-02-20 08:51:19.000000000 +0100
+++ new/yast2-core-2.16.36/configure.in 2008-02-20 16:44:35.000000000 +0100
@@ -3,7 +3,7 @@
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.35, http://bugs.opensuse.org/, yast2-core)
+AC_INIT(yast2-core, 2.16.36, 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.35"
+VERSION="2.16.36"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/liby2util-r/src/y2log.cc new/yast2-core-2.16.36/liby2util-r/src/y2log.cc
--- old/yast2-core-2.16.35/liby2util-r/src/y2log.cc 2007-11-23 10:48:37.000000000 +0100
+++ new/yast2-core-2.16.36/liby2util-r/src/y2log.cc 2008-02-20 16:44:17.000000000 +0100
@@ -9,7 +9,7 @@
* Michal Svec
* Arvin Schnell
*
- * $Id: y2log.cc 41993 2007-11-13 09:45:16Z mvidner $
+ * $Id: y2log.cc 44678 2008-02-20 10:39:01Z mvidner $
*/
#include
@@ -29,6 +29,7 @@
#include "y2util/y2log.h"
#include "y2util/miniini.h"
#include "y2util/stringutil.h"
+#include "y2util/PathInfo.h"
#include
/* Defines */
@@ -65,7 +66,7 @@
static bool did_set_logname = false;
static bool did_read_logconf = false;
-static char *logname;
+static const char *logname;
static off_t maxlogsize;
static int maxlognum;
@@ -120,6 +121,25 @@
}
static int variable_not_used = dup_stderr();
+static FILE * open_logfile()
+{
+ FILE *logfile = Y2LOG_STDERR;
+ if (*logname != '-') {
+ logfile = fopen (logname, "a");
+ // try creating the directory if it may be missing
+ if (!logfile && errno == ENOENT) {
+ PathInfo::assert_dir (Pathname::dirname(logname), 0700);
+ // and retry
+ logfile = fopen (logname, "a");
+ }
+ if (!logfile && !log_simple) {
+ fprintf (Y2LOG_STDERR, "y2log: Error opening logfile '%s': %s.\n",
+ logname, strerror (errno));
+ return NULL;
+ }
+ }
+ return logfile;
+}
/**
* The universal logger function
@@ -203,15 +223,9 @@
/* Prepare the logfile */
shift_log_files (string (logname));
- FILE *logfile = Y2LOG_STDERR;
- if (*logname != '-') {
- logfile = fopen (logname, "a");
- if (!logfile && !log_simple) {
- fprintf (Y2LOG_STDERR, "y2log: Error opening logfile '%s': %s (%s:%d).\n",
- logname, strerror (errno), file, line);
- return;
- }
- }
+ FILE *logfile = open_logfile ();
+ if (!logfile)
+ return;
/* Prepare the date */
#if 1
@@ -277,15 +291,9 @@
/* Prepare the logfile */
shift_log_files (string (logname));
- FILE *logfile = Y2LOG_STDERR;
- if (*logname != '-') {
- logfile = fopen (logname, "a");
- if (!logfile && !log_simple) {
- fprintf (Y2LOG_STDERR, "y2log: Error opening logfile '%s': %s.\n",
- logname, strerror (errno));
- return;
- }
- }
+ FILE *logfile = open_logfile ();
+ if (!logfile)
+ return;
fprintf (logfile, Y2LOG_RAW, logmessage);
@@ -342,9 +350,10 @@
}
else
{
- logname = (char *)malloc (strlen (pw->pw_dir) + strlen (Y2LOG_USER) + 1);
- strcpy (logname, pw->pw_dir);
- strcat (logname, Y2LOG_USER);
+ // never freed
+ char * my_logname = (char *)malloc (strlen (pw->pw_dir) + strlen (Y2LOG_USER) + 1);
+ strcpy (my_logname, pw->pw_dir);
+ logname = strcat (my_logname, Y2LOG_USER);
}
}
else /* Root */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/doc/examples/radioButtonGroup.ycp new/yast2-core-2.16.36/libyui/doc/examples/radioButtonGroup.ycp
--- old/yast2-core-2.16.35/libyui/doc/examples/radioButtonGroup.ycp 2007-12-03 10:52:18.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/doc/examples/radioButtonGroup.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{
- textdomain "bogus";
-
- UI::OpenDialog(
- `RadioButtonGroup(`id (`rbg),
- `VBox(
- `RadioButton (`id ("users"), `opt(`notify), _("&Users")),
- `RadioButton (`id ("groups"), `opt(`notify), _("&Groups")),
- `Right (`Label (`id(`current_filter), _( "Filter" ) ))
- )
- )
- );
- UI::UserInput();
- string val = (string)UI::QueryWidget (`id(`rbg), `Value);
- y2internal ("val: %1", val);
- UI::CloseDialog();
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/YCommandLine.cc new/yast2-core-2.16.36/libyui/src/YCommandLine.cc
--- old/yast2-core-2.16.35/libyui/src/YCommandLine.cc 2008-02-14 13:36:21.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/YCommandLine.cc 2008-02-20 16:44:17.000000000 +0100
@@ -19,10 +19,8 @@
#include // malloc()
#include // strdup()
-#include // getpid()
#include <vector>
-#include <sstream>
#include <fstream>
#include "YCommandLine.h"
@@ -49,10 +47,7 @@
{
YUI_CHECK_NEW( priv );
- std::ostringstream fileName;
- fileName << "/proc/" << getpid() << "/cmdline";
-
- ifstream cmdline( fileName.str().c_str(), ifstream::in | ifstream::binary );
+ ifstream cmdline( "/proc/self/cmdline", ifstream::in | ifstream::binary );
while ( cmdline.good() )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/ycp-ui/YCPDialogParser.cc new/yast2-core-2.16.36/libyui/src/ycp-ui/YCPDialogParser.cc
--- old/yast2-core-2.16.35/libyui/src/ycp-ui/YCPDialogParser.cc 2008-02-14 16:00:21.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/ycp-ui/YCPDialogParser.cc 2008-02-20 16:44:17.000000000 +0100
@@ -1894,6 +1894,7 @@
* and opening subtrees. If the UI cannot handle this, all
* subtrees will always be open.
*
+ * @option immediate make `notify trigger immediately when the selected item changes
* @usage `Tree( `id( `treeID ), "treeLabel", [ "top1", "top2", "top3" ] );
* @examples Tree1.ycp
* Tree2.ycp
@@ -1934,7 +1935,13 @@
THROW_BAD_ARGS( term );
}
- rejectAllOptions( term,optList );
+ bool immediate = false;
+
+ for ( int o=0; o < optList->size(); o++ )
+ {
+ if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_immediate ) immediate = true;
+ else logUnknownOption( term, optList->value(o) );
+ }
string label = term->value ( argnr )->asString()->value();
@@ -1949,6 +1956,9 @@
tree->selectItem( tree->firstItem() );
}
+ if ( immediate )
+ tree->setImmediateMode( true ); // includes setNotify()
+
return tree;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponent.cc new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponent.cc
--- old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponent.cc 2008-02-20 07:50:14.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponent.cc 2008-02-20 17:27:19.000000000 +0100
@@ -28,6 +28,7 @@
#include "YUINamespace.h"
#include "YUI.h"
#include "YUILoader.h"
+#include "YUIException.h"
#include "YMacro.h"
#include "YCPMacroRecorder.h"
@@ -52,6 +53,7 @@
YUI * YUIComponent::_ui = 0;
YUIComponent * YUIComponent::_uiComponent = 0;
+bool YUIComponent::_useDummyUI = false;
YUIComponent::YUIComponent( const string & name )
@@ -135,30 +137,42 @@
return;
}
+ if ( _useDummyUI )
+ {
+ y2warning( "Using dummy UI, NOT creating a UI" );
+ return;
+ }
+
y2debug( "Creating UI" );
YUILog::setLoggerFunction( yui_y2logger );
- if ( _requestedUIName.empty() )
- YUILoader::loadUI( _withThreads );
- else
- YUILoader::loadPlugin( _requestedUIName, _withThreads );
+ try
+ {
+ if ( _requestedUIName.empty() )
+ YUILoader::loadUI( _withThreads );
+ else
+ YUILoader::loadPlugin( _requestedUIName, _withThreads );
- _ui = YUI::ui();
+ _ui = YUI::ui();
- YMacro::setRecorder( new YCPMacroRecorder() );
- YMacro::setPlayer ( new YCPMacroPlayer() );
+ YMacro::setRecorder( new YCPMacroRecorder() );
+ YMacro::setPlayer ( new YCPMacroPlayer() );
+ }
+ catch ( YUICantLoadAnyUIException & ex )
+ {
+ // Special case: Dummy UI (needed in test cases)
+
+ YUI_CAUGHT( ex );
+ }
}
YCPValue
YUIComponent::callBuiltin( void * function, int fn_argc, YCPValue fn_argv[] )
{
- if ( ! _ui )
- {
- y2debug( "Late creation of UI instance" );
+ if ( ! _ui && ! _useDummyUI )
createUI();
- }
if ( _ui )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponentCreator.cc new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponentCreator.cc
--- old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponentCreator.cc 2008-02-20 07:50:14.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponentCreator.cc 2008-02-20 17:27:19.000000000 +0100
@@ -69,7 +69,7 @@
{
y2debug ("UI library namespace provider tries for '%s'", cname);
// implementation shortcut: we only provide the UI namespace and the UI component
- return create( cname );
+ return createInternal( cname, true ); // isNamespace
}
else
{
@@ -79,10 +79,18 @@
Y2Component *
-YUIComponentCreator::create( const char * cname ) const
+YUIComponentCreator::create( const char * name ) const
{
- y2debug( "Requested \"%s\"", cname );
- string name( cname );
+ createInternal( name,
+ false ); // isNamespace
+}
+
+
+Y2Component *
+YUIComponentCreator::createInternal( const string & componentName, bool isNamespace ) const
+{
+ string name = componentName;
+ y2debug( "Requested \"%s\"", name.c_str() );
if ( name == "UI" ||
name == "qt" ||
@@ -92,6 +100,9 @@
#endif
name == "ui" )
{
+ if ( name == "UI" && ! isNamespace )
+ YUIComponent::setUseDummyUI( true );
+
if ( name == "UI" || name == "ui" )
name = ""; // Automatically choose the appropriate UI
@@ -99,12 +110,12 @@
if ( ! uiComponent )
{
- y2milestone("Creating UI component for \"%s\"", cname );
+ y2milestone("Creating UI component for \"%s\"", name.c_str() );
uiComponent = new YUIComponent( name );
if ( ! uiComponent )
{
- y2error( "Creating UI component \"%s\"s failed", cname );
+ y2error( "Creating UI component \"%s\"s failed", name.c_str() );
}
}
else
@@ -114,7 +125,7 @@
uiComponent->setRequestedUIName( name );
}
- y2milestone( "Returning existing UI component for \"%s\"", cname );
+ y2milestone( "Returning existing UI component for \"%s\"", name.c_str() );
}
return uiComponent;
@@ -129,7 +140,8 @@
Y2Component *
YUIComponentCreator::createInLevel( const char * name, int level, int currentLevel ) const
{
- return create( name );
+ return createInternal( name,
+ false ); // isNamespace
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponentCreator.h new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponentCreator.h
--- old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponentCreator.h 2008-02-20 07:50:14.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponentCreator.h 2008-02-20 17:27:15.000000000 +0100
@@ -22,8 +22,10 @@
#define YUIComponentCreator_h
#include
+#include <string>
class Y2Component;
+using std::string;
/**
@@ -71,6 +73,13 @@
* on trying with other available creators.
**/
virtual Y2Component * provideNamespace( const char * name );
+
+protected:
+
+ /**
+ * Internal create method.
+ **/
+ Y2Component * createInternal( const string & name, bool isNamespace ) const;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponent.h new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponent.h
--- old/yast2-core-2.16.35/libyui/src/ycp-ui/YUIComponent.h 2008-02-20 07:50:14.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/ycp-ui/YUIComponent.h 2008-02-20 17:27:15.000000000 +0100
@@ -113,6 +113,20 @@
* command line argument or 0 if none
**/
const char * macroFile() const { return _macroFile; }
+
+ /**
+ * Return 'true' if a dummy UI is used, i.e. a real UI will never be
+ * instantiated. This is used in YCP testsuites to prevent UI calls
+ * blocking the testsuite workflow.
+ **/
+ static bool useDummyUI() { return _useDummyUI; }
+
+ /**
+ * Set the useDummyUI flag to prevent a real UI from ever being
+ * instantiated. This is used in YCP testsuites to prevent UI calls
+ * blocking the testsuite workflow.
+ **/
+ static void setUseDummyUI( bool useDummyUI ) { _useDummyUI = useDummyUI; }
/**
* Set a callback component.
@@ -130,6 +144,7 @@
static YUI * _ui;
static YUIComponent * _uiComponent;
+ static bool _useDummyUI;
string _requestedUIName;
bool _withThreads;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/YTree.cc new/yast2-core-2.16.36/libyui/src/YTree.cc
--- old/yast2-core-2.16.35/libyui/src/YTree.cc 2008-02-14 13:36:21.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/YTree.cc 2008-02-20 16:44:17.000000000 +0100
@@ -28,9 +28,10 @@
struct YTreePrivate
{
YTreePrivate()
+ : immediateMode( false )
{}
- int dummy;
+ bool immediateMode;
};
@@ -54,6 +55,23 @@
}
+bool
+YTree::immediateMode() const
+{
+ return priv->immediateMode;
+}
+
+
+void
+YTree::setImmediateMode( bool immediateMode )
+{
+ priv->immediateMode = immediateMode;
+
+ if ( immediateMode )
+ setNotify( true );
+}
+
+
void
YTree::addItems( const YItemCollection & itemCollection )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/YTree.h new/yast2-core-2.16.36/libyui/src/YTree.h
--- old/yast2-core-2.16.35/libyui/src/YTree.h 2008-02-08 12:59:55.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/YTree.h 2008-02-20 16:44:17.000000000 +0100
@@ -31,7 +31,7 @@
* optional icon (*).
*
* This is very similar to SelectionBox, but each item can have subitems that
- * can be open (expanded) or closed (collapsed).
+ * can be open (expanded) or closed (collapsed).
*
* The tree widget also has a caption label that is displayed above the
* tree. The hotkey displayed in that caption label will move the keyboard
@@ -85,6 +85,31 @@
virtual void addItems( const YItemCollection & itemCollection );
/**
+ * Deliver even more events than with notify() set.
+ *
+ * For YTree, this is relevant mostly for the NCurses UI:
+ *
+ * In graphical UIs like the Qt UI, the user can use the mouse to select an
+ * item in a tree. With notify() set, this will send an event right away
+ * (i.e., it will make UserInput and related return, while normally it
+ * would only return when the user clicks a PushButton).
+ *
+ * In the NCurses UI, there is no mouse, so the user has to use the cursor
+ * keys to move to the item he wants to select. In immediateMode(), every
+ * cursor key press will make the tree send an event. Without
+ * immediateMode(), the NCTree will wait until the user hits the [Return]
+ * key until an event is sent. Depending on what the application does upon
+ * each selection box event, immediateMode() might make the application
+ * less responsive.
+ **/
+ bool immediateMode() const;
+
+ /**
+ * Set immediateMode() on or off.
+ **/
+ void setImmediateMode( bool on = true );
+
+ /**
* Set a property.
* Reimplemented from YWidget.
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/YUIException.h new/yast2-core-2.16.36/libyui/src/YUIException.h
--- old/yast2-core-2.16.35/libyui/src/YUIException.h 2008-02-18 11:17:30.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/YUIException.h 2008-02-20 16:44:17.000000000 +0100
@@ -861,6 +861,21 @@
};
+/**
+ * Exception class for UI plugin load failure
+ **/
+class YUICantLoadAnyUIException: public YUIException
+{
+public:
+ YUICantLoadAnyUIException()
+ : YUIException("No $DISPLAY and stdout is not a tty" )
+ {}
+
+ virtual ~YUICantLoadAnyUIException() throw()
+ {}
+};
+
+
//
// Helper templates
//
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/libyui/src/YUILoader.cc new/yast2-core-2.16.36/libyui/src/YUILoader.cc
--- old/yast2-core-2.16.35/libyui/src/YUILoader.cc 2008-02-18 11:17:30.000000000 +0100
+++ new/yast2-core-2.16.36/libyui/src/YUILoader.cc 2008-02-20 16:44:17.000000000 +0100
@@ -64,7 +64,7 @@
}
else
{
- YUI_THROW( YUIException( "No $DISPLAY and stdout is not a tty" ) );
+ YUI_THROW( YUICantLoadAnyUIException() );
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.35/VERSION new/yast2-core-2.16.36/VERSION
--- old/yast2-core-2.16.35/VERSION 2008-02-20 07:50:15.000000000 +0100
+++ new/yast2-core-2.16.36/VERSION 2008-02-20 16:44:17.000000000 +0100
@@ -1 +1 @@
-2.16.35
+2.16.36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org