Hello community, here is the log from the commit of package yast2-core for openSUSE:Factory checked in at Sat Mar 7 11:48:26 CET 2009. -------- --- yast2-core/yast2-core.changes 2009-01-29 17:29:45.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2009-03-06 14:27:43.000000000 +0100 @@ -1,0 +2,31 @@ +Fri Mar 6 13:53:48 CET 2009 - mvidner@suse.cz + +- ag_background: re-disabled the testsuite, silly me. +- 2.18.4 + +------------------------------------------------------------------- +Fri Mar 6 13:08:10 CET 2009 - lslezak@suse.cz + +- put backtrace begin and end markers to y2log when e.g. + y2error(-1, ...) is called + +------------------------------------------------------------------- +Fri Mar 6 10:57:11 CET 2009 - mvidner@suse.cz + +- ag_background: re-enabled the testsuite (bnc#470645#c11), + with some expect magic (~bnc#475551) + +------------------------------------------------------------------- +Wed Feb 25 14:49:33 CET 2009 - mvidner@suse.cz + +- Fixed tty_wrapper losing output: stdio was interrupted by SIGCHLD (bnc#470645). + +------------------------------------------------------------------- +Sun Feb 01 03:14:16 CET 2009 - mvidner@suse.cz + +- dbus: fixed timeout handling to reduce latency (kkaempf) + http://lists.opensuse.org/yast-devel/2009-02/msg00004.html +- dbus: code cleanup (kkaempf) +- dbus: fixed resource leaks (aschnell, lslezak) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-core-2.18.3.tar.bz2 New: ---- yast2-core-2.18.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-core.spec ++++++ --- /var/tmp/diff_new_pack.W31091/_old 2009-03-07 11:47:59.000000000 +0100 +++ /var/tmp/diff_new_pack.W31091/_new 2009-03-07 11:47:59.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-core (Version 2.18.3) +# spec file for package yast2-core (Version 2.18.4) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,12 +19,12 @@ Name: yast2-core -Version: 2.18.3 +Version: 2.18.4 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-core-2.18.3.tar.bz2 +Source0: yast2-core-2.18.4.tar.bz2 Prefix: /usr # obviously BuildRequires: gcc-c++ @@ -95,7 +95,7 @@ Stanislav Visnovsky <visnov@suse.cz> %prep -%setup -n yast2-core-2.18.3 +%setup -n yast2-core-2.18.4 %build %{prefix}/bin/y2tool y2autoconf @@ -181,6 +181,22 @@ %doc %{_datadir}/doc/yastdoc /usr/share/YaST2/data/devtools/bin/generateYCPWrappers %changelog +* Fri Mar 06 2009 mvidner@suse.cz +- ag_background: re-disabled the testsuite, silly me. +- 2.18.4 +* Fri Mar 06 2009 lslezak@suse.cz +- put backtrace begin and end markers to y2log when e.g. + y2error(-1, ...) is called +* Fri Mar 06 2009 mvidner@suse.cz +- ag_background: re-enabled the testsuite (bnc#470645#c11), + with some expect magic (~bnc#475551) +* Wed Feb 25 2009 mvidner@suse.cz +- Fixed tty_wrapper losing output: stdio was interrupted by SIGCHLD (bnc#470645). +* Sun Feb 01 2009 mvidner@suse.cz +- dbus: fixed timeout handling to reduce latency (kkaempf) + http://lists.opensuse.org/yast-devel/2009-02/msg00004.html +- dbus: code cleanup (kkaempf) +- dbus: fixed resource leaks (aschnell, lslezak) * Thu Jan 29 2009 aschnell@suse.de - added dbus client agent (required for bnc #464453) - 2.18.3 ++++++ yast2-core-2.18.3.tar.bz2 -> yast2-core-2.18.4.tar.bz2 ++++++ ++++ 36926 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.18.3/agent-dbus/conf/dbus.scr new/yast2-core-2.18.4/agent-dbus/conf/dbus.scr --- old/yast2-core-2.18.3/agent-dbus/conf/dbus.scr 2009-01-27 11:14:24.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/conf/dbus.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -/** - * File: - * dbus.scr - * Authors: - * Arvin Schnell <aschnell@suse.de> - */ -.dbus - -`ag_dbus() 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.18.3/agent-dbus/conf/dbus.session.scr new/yast2-core-2.18.4/agent-dbus/conf/dbus.session.scr --- old/yast2-core-2.18.3/agent-dbus/conf/dbus.session.scr 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/conf/dbus.session.scr 2009-02-12 15:55:28.000000000 +0100 @@ -0,0 +1,11 @@ +/** + * File: + * dbus.session.scr + * Authors: + * Arvin Schnell <aschnell@suse.de> + */ +.dbus.session + +`ag_dbus( + `Bus("session") +) 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.18.3/agent-dbus/conf/dbus.system.scr new/yast2-core-2.18.4/agent-dbus/conf/dbus.system.scr --- old/yast2-core-2.18.3/agent-dbus/conf/dbus.system.scr 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/conf/dbus.system.scr 2009-02-12 15:55:28.000000000 +0100 @@ -0,0 +1,11 @@ +/** + * File: + * dbus.system.scr + * Authors: + * Arvin Schnell <aschnell@suse.de> + */ +.dbus.system + +`ag_dbus( + `Bus("system") +) 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.18.3/agent-dbus/conf/Makefile.am new/yast2-core-2.18.4/agent-dbus/conf/Makefile.am --- old/yast2-core-2.18.3/agent-dbus/conf/Makefile.am 2009-01-27 11:14:42.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/conf/Makefile.am 2009-02-12 15:55:28.000000000 +0100 @@ -2,6 +2,6 @@ # Makefile.am for core/agent-dbus/conf # -scrconf_DATA = dbus.scr +scrconf_DATA = dbus.system.scr dbus.session.scr EXTRA_DIST = $(scrconf_DATA) 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.18.3/agent-dbus/src/DbusAgent.cc new/yast2-core-2.18.4/agent-dbus/src/DbusAgent.cc --- old/yast2-core-2.18.3/agent-dbus/src/DbusAgent.cc 2009-01-29 15:13:13.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/src/DbusAgent.cc 2009-02-12 15:55:28.000000000 +0100 @@ -13,27 +13,15 @@ DbusAgent::DbusAgent() + : connection(NULL) { - y2milestone("connecting dbus"); - dbus_error_init(&error); - - connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); - if (dbus_error_is_set(&error)) - { - y2error("dbus_bus_get failed (%s)\n", error.message); - dbus_error_free(&error); - } - - if (connection == NULL) - { - y2error("connecting dbus failed"); - } } DbusAgent::~DbusAgent() { + disconnect(); } @@ -149,16 +137,23 @@ { const char* param = tmp3->asString()->value_cstr(); if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, ¶m)) + { + dbus_message_unref(message); return YCPError("dbus_message_iter_append_basic() failed"); + } } else if (tmp3->isBoolean()) { bool param = tmp3->asBoolean()->value(); if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_BOOLEAN, ¶m)) + { + dbus_message_unref(message); return YCPError("dbus_message_iter_append_basic() failed"); + } } else { + dbus_message_unref(message); return YCPError("Unsupported type"); } } @@ -185,3 +180,62 @@ return YCPError(string("Undefined subpath for Execute(") + path->toString() + ")"); } + + +YCPValue +DbusAgent::otherCommand(const YCPTerm& term) +{ + string sym = term->name(); + + if (sym == "Bus") + { + if (term->size() != 1 || !term->value(0)->isString()) + { + return YCPError("Bad number of arguments. Expecting Bus (\"type\")"); + } + + string bus = term->value(0)->asString()->value(); + if (bus == "system") + connect(DBUS_BUS_SYSTEM); + else if (bus == "session") + connect(DBUS_BUS_SESSION); + else + return YCPError("Unknown bus"); + + return YCPBoolean(true); + } + + return YCPNull(); +} + + +void +DbusAgent::connect(DBusBusType type) +{ + disconnect(); + + y2milestone("connecting dbus"); + + connection = dbus_bus_get(type, &error); + if (dbus_error_is_set(&error)) + { + y2error("dbus_bus_get() failed (%s)", error.message); + dbus_error_free(&error); + } + + if (connection == NULL) + { + y2error("connecting dbus failed"); + } +} + + +void +DbusAgent::disconnect() +{ + if (connection) + { + dbus_connection_unref(connection); + connection = NULL; + } +} 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.18.3/agent-dbus/src/DbusAgent.h new/yast2-core-2.18.4/agent-dbus/src/DbusAgent.h --- old/yast2-core-2.18.3/agent-dbus/src/DbusAgent.h 2009-01-29 12:54:01.000000000 +0100 +++ new/yast2-core-2.18.4/agent-dbus/src/DbusAgent.h 2009-02-12 15:55:28.000000000 +0100 @@ -52,8 +52,16 @@ */ virtual YCPList Dir(const YCPPath& path) { return YCPList(); } + /** + * Used for mounting the agent. + */ + virtual YCPValue otherCommand(const YCPTerm& term); + private: + void connect(DBusBusType type); + void disconnect(); + DBusConnection* connection; DBusError error; 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.18.3/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.18.4/agents-perl/doc/ycp-pm-pod.html --- old/yast2-core-2.18.3/agents-perl/doc/ycp-pm-pod.html 2009-01-23 20:00:39.000000000 +0100 +++ new/yast2-core-2.18.4/agents-perl/doc/ycp-pm-pod.html 2009-01-26 14:04:49.000000000 +0100 @@ -4,7 +4,7 @@ <head> <title>ycp - a Perl module for parsing and writing the YaST2 Communication Protocol</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<link rev="made" href="mailto:feedback@suse.de" /> +<link rev="made" href="mailto:root@localhost" /> </head> <body style="background-color: white"> @@ -104,36 +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="string_integer_boolean" class="item">string, integer, boolean</a></strong> +<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong></dt> <dd> <p>Stored as a scalar.</p> </dd> -</li> -<dt><strong><a name="list" class="item">list</a></strong> +<dt><strong><a name="list" class="item">list</a></strong></dt> <dd> <p>Stored as a reference to a list of PerlYCPValues.</p> </dd> -</li> -<dt><strong><a name="map" class="item">map</a></strong> +<dt><strong><a name="map" class="item">map</a></strong></dt> <dd> <p>Stored as a reference to a map of PerlYCPValues.</p> </dd> -</li> -<dt><strong><a name="path" class="item">path</a></strong> +<dt><strong><a name="path" class="item">path</a></strong></dt> <dd> <p>Stored as a reference to a string (starting with a "." as expected).</p> </dd> -</li> -<dt><strong><a name="nil" class="item">nil (void)</a></strong> +<dt><strong><a name="nil" class="item">nil (void)</a></strong></dt> <dd> <p>Stored as an undef.</p> </dd> -</li> </dl> <p> </p> 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.18.3/agents-perl/testsuite/t-echo.exp new/yast2-core-2.18.4/agents-perl/testsuite/t-echo.exp --- old/yast2-core-2.18.3/agents-perl/testsuite/t-echo.exp 2009-01-23 16:45:29.000000000 +0100 +++ new/yast2-core-2.18.4/agents-perl/testsuite/t-echo.exp 2009-03-06 10:47:26.000000000 +0100 @@ -3,8 +3,6 @@ source test-common.exp -expect -exact "" - # sleep: have it still running while this simple test runs send "`Execute(.run, \"sleep 2; echo Hello world\")\r" expect "(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.18.3/agents-perl/testsuite/test-common.exp new/yast2-core-2.18.4/agents-perl/testsuite/test-common.exp --- old/yast2-core-2.18.3/agents-perl/testsuite/test-common.exp 2009-01-23 16:45:29.000000000 +0100 +++ new/yast2-core-2.18.4/agents-perl/testsuite/test-common.exp 2009-03-06 13:41:26.000000000 +0100 @@ -1,7 +1,8 @@ # common setup for test cases of ag_backgound -#tests disabled until libyui is integrated -exit 0 +#tests disabled until I figure out bnc#475551 +exit 77 # automake TESTS: SKIP + # enlarge your input buffer now! satisfaction guaranteed! give us your $$$ match_max 100000 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.18.3/agents-perl/testsuite/t-norun.exp new/yast2-core-2.18.4/agents-perl/testsuite/t-norun.exp --- old/yast2-core-2.18.3/agents-perl/testsuite/t-norun.exp 2009-01-23 16:45:29.000000000 +0100 +++ new/yast2-core-2.18.4/agents-perl/testsuite/t-norun.exp 2009-03-06 10:47:26.000000000 +0100 @@ -3,8 +3,6 @@ source test-common.exp -expect -exact "" - send "`Read(.pid)\r" expect "(-1)" send_user "\n" 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.18.3/base/tools/tty_wrapper/tty_wrapper.cc new/yast2-core-2.18.4/base/tools/tty_wrapper/tty_wrapper.cc --- old/yast2-core-2.18.3/base/tools/tty_wrapper/tty_wrapper.cc 2009-01-23 16:45:39.000000000 +0100 +++ new/yast2-core-2.18.4/base/tools/tty_wrapper/tty_wrapper.cc 2009-02-25 15:36:11.000000000 +0100 @@ -74,6 +74,32 @@ return true; } +void output(const std::string & s, int fd) +{ + const char *cs = s.c_str(); + while (true) { + ssize_t n = s.size(); + ssize_t w = write(fd, cs, n); + if (w == n) + break; // success + else if (w == -1) { + if (errno == EINTR) { + // perror("gotcha"); // bnc#470645 + } + else { + perror("write"); // other cases + break; + } + } + else { + errno = 0; + perror("short"); + cs += w; + n -= w; + } + } +} + int main(int argc, char **argv) { if (argc > 1) @@ -119,6 +145,11 @@ if (finish) { + // read the remaining pieces + std::string std_out(subprocess.read()); + output(std_out, 1); + std::string err_out(subprocess.readErr()); + output(err_out, 2); // SIGCHLD received, return the exit status return subprocess.close(); } @@ -168,7 +199,7 @@ { // read stdout of the subprocess and print it on stdout std::string std_out(subprocess.read()); - std::cout << std_out; + output(std_out, 1); } // stderr available @@ -176,7 +207,7 @@ { // read stderr of the subprocess and print it on stderr std::string err_out(subprocess.readErr()); - std::cerr << err_out; + output(err_out, 2); } } } @@ -189,4 +220,3 @@ return 1; } } - 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.18.3/configure.in new/yast2-core-2.18.4/configure.in --- old/yast2-core-2.18.3/configure.in 2009-01-29 17:14:12.000000000 +0100 +++ new/yast2-core-2.18.4/configure.in 2009-03-06 14:28:29.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for yast2-core dnl -dnl -- This file is generated by y2autoconf 2.18.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-core, 2.18.3, http://bugs.opensuse.org/, yast2-core) +AC_INIT(yast2-core, 2.18.4, 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.18.3" +VERSION="2.18.4" RPMNAME="yast2-core" MAINTAINER="Martin Vidner <mvidner@suse.cz>" @@ -285,6 +285,28 @@ HAVE_POLKIT=0 fi +# +# configuration for dbus/SCR_service +# + +# set access mode according to the PolicyKit status +# if policykit is disabled only root can access the service +if test $HAVE_POLKIT -ne 0; then +ACCESS_MODE=allow +else +ACCESS_MODE=deny +fi + + +YAST_SCR_SERVICE=org.opensuse.yast.SCR +YAST_SCR_INTERFACE=org.opensuse.yast.SCR.Methods +# @ybindir@ expands to ${prefix}/lib/..., force full expansion here +YAST_SCR_SERVICE_DIR=$ybindir +AC_SUBST(YAST_SCR_SERVICE) +AC_SUBST(YAST_SCR_SERVICE_DIR) +AC_SUBST(YAST_SCR_INTERFACE) +AC_SUBST(ACCESS_MODE) + AC_SUBST(POLKIT_CFLAGS) AC_SUBST(POLKIT_LIBS) AC_SUBST(HAVE_POLKIT) @@ -293,6 +315,10 @@ AC_CONFIG_FILES([ scr/doc/SCR.html scr/doc/intro_to_scr.html + dbus/SCR_service/org.opensuse.yast.SCR.conf + dbus/SCR_service/org.opensuse.yast.SCR.service.in + dbus/SCR_service/scr_names.h + dbus/SCR_service/test_SCR_dbus_server.rb ]) AC_CONFIG_FILES(Makefile liby2util-r/src/include/y2util/Makefile liby2util-r/src/include/Makefile 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.18.3/configure.in.in new/yast2-core-2.18.4/configure.in.in --- old/yast2-core-2.18.3/configure.in.in 2009-01-23 16:45:42.000000000 +0100 +++ new/yast2-core-2.18.4/configure.in.in 2009-02-23 15:23:51.000000000 +0100 @@ -124,6 +124,28 @@ HAVE_POLKIT=0 fi +# +# configuration for dbus/SCR_service +# + +# set access mode according to the PolicyKit status +# if policykit is disabled only root can access the service +if test $HAVE_POLKIT -ne 0; then +ACCESS_MODE=allow +else +ACCESS_MODE=deny +fi + + +YAST_SCR_SERVICE=org.opensuse.yast.SCR +YAST_SCR_INTERFACE=org.opensuse.yast.SCR.Methods +# @ybindir@ expands to ${prefix}/lib/..., force full expansion here +YAST_SCR_SERVICE_DIR=$ybindir +AC_SUBST(YAST_SCR_SERVICE) +AC_SUBST(YAST_SCR_SERVICE_DIR) +AC_SUBST(YAST_SCR_INTERFACE) +AC_SUBST(ACCESS_MODE) + AC_SUBST(POLKIT_CFLAGS) AC_SUBST(POLKIT_LIBS) AC_SUBST(HAVE_POLKIT) @@ -133,5 +155,9 @@ AC_CONFIG_FILES([ scr/doc/SCR.html scr/doc/intro_to_scr.html + dbus/SCR_service/org.opensuse.yast.SCR.conf + dbus/SCR_service/org.opensuse.yast.SCR.service.in + dbus/SCR_service/scr_names.h + dbus/SCR_service/test_SCR_dbus_server.rb ]) @YAST2-OUTPUT@ 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.18.3/dbus/SCR_service/DBusServer.cc new/yast2-core-2.18.4/dbus/SCR_service/DBusServer.cc --- old/yast2-core-2.18.3/dbus/SCR_service/DBusServer.cc 2009-01-23 16:45:37.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/DBusServer.cc 2009-02-23 15:24:40.000000000 +0100 @@ -14,6 +14,10 @@ #include <ycp/y2log.h> +#include "scr_names.h" + +#define TIMEOUT 15 /* 30 secs idle timeout */ + extern "C" { // nanosleep() @@ -44,16 +48,16 @@ } +// connect to DBus, request a service name bool DBusServer::connect() { - // connect to DBus, request a service name - return connection.connect(DBUS_BUS_SYSTEM, "org.opensuse.yast.SCR"); + return connection.connect(DBUS_BUS_SYSTEM, YAST_SCR_SERVICE); } -// set 30 second timer +// reset idle timer void DBusServer::resetTimer() { - ::alarm(30); + ::alarm(TIMEOUT); } // NOTE: this is a signal handler, do only really necessary tasks here! @@ -67,6 +71,7 @@ } } +// register signal handler for idle timeout void DBusServer::registerSignalHandler() { struct sigaction new_action, old_action; @@ -82,10 +87,10 @@ } } +// check if clients are still running, +// remove finished clients bool DBusServer::canFinish() { - // check if clients are still running, - // remove finished clients for(Clients::iterator it = clients.begin(); it != clients.end();) { @@ -134,7 +139,7 @@ // the time is over if (finish) { - y2milestone("Timout signal received"); + y2milestone("Timeout signal received"); if (canFinish()) { @@ -150,14 +155,14 @@ } } - // set 5 seconds timeout - connection.setTimeout(5000); // try reading a message from DBus DBusMsg request(connection.receive()); // check if a message was received if (request.empty()) { + /* run the mainloop only on message or after(!) reaching the idle timeout */ + connection.setTimeout((TIMEOUT+1)*1000); /* returns on message or timeout */ continue; } @@ -172,7 +177,9 @@ request.interface().c_str(), request.method().c_str()); // check this is a method call for the right object, interface & method - if (request.type() == DBUS_MESSAGE_TYPE_METHOD_CALL && request.interface() == "org.opensuse.yast.SCR.Methods" && request.path() == "/SCR") + if (request.type() == DBUS_MESSAGE_TYPE_METHOD_CALL + && request.interface() == YAST_SCR_INTERFACE + && request.path() == SCR_OBJECT_PATH) { std::string method(request.method()); @@ -182,9 +189,14 @@ bool check_ok = false; // check missing arguments - if (method == "Read" || method == "Write" || method == "Execute" || - method == "Dir" || method == "Error" || method == "UnregisterAgent" || - method == "UnmountAgent" || method == "RegisterAgent") + if (method == METHOD_READ + || method == METHOD_WRITE + || method == METHOD_EXECUTE + || method == METHOD_DIR + || method == METHOD_ERROR + || method == METHOD_UNREGISTER + || method == METHOD_UNMOUNT + || method == METHOD_REGISTER) { if (request.arguments() == 0) { @@ -207,7 +219,7 @@ } } } - else if (method == "UnregisterAllAgents" || method != "RegisterNewAgents") + else if (method == METHOD_UNREGISTER_ALL || method != METHOD_REGISTER_NEW) { check_ok = true; } @@ -254,29 +266,29 @@ YCPValue ret; - if (method == "Read") + if (method == METHOD_READ) ret = sa->Read(pth, arg, opt); - else if (method == "Write") + else if (method == METHOD_WRITE) ret = sa->Write(pth, arg, opt); - else if (method == "Execute") + else if (method == METHOD_EXECUTE) ret = sa->Execute(pth, arg, opt); - else if (method == "Dir") + else if (method == METHOD_DIR) { ret = sa->Dir(pth); if (ret.isNull()) ret = YCPList(); } - else if (method == "Error") + else if (method == METHOD_ERROR) ret = sa->Error(pth); - else if (method == "UnregisterAgent") + else if (method == METHOD_UNREGISTER) ret = sa->UnregisterAgent(pth); - else if (method == "UnregisterAllAgents") + else if (method == METHOD_UNREGISTER_ALL) ret = sa->UnregisterAllAgents(); - else if (method == "UnmountAgent") + else if (method == METHOD_UNMOUNT) ret = sa->UnmountAgent(pth); - else if (method == "RegisterNewAgents") + else if (method == METHOD_REGISTER_NEW) ret = sa->RegisterNewAgents(); - else if (method == "RegisterAgent") + else if (method == METHOD_REGISTER) ret = sa->RegisterAgent(pth, arg); else y2internal("Unhandled method %s", method.c_str()); @@ -298,11 +310,11 @@ { y2milestone("Requesting path: %s", request.path().c_str()); // define all exported methods here - const char *introspect = (request.path() != "/SCR") ? + const char *introspect = (request.path() != SCR_OBJECT_PATH) ? // introcpection data for the root node DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node>" -" <interface name='org.freedesktop.DBus.Introspectable'>" +" <interface name='"DBUS_INTERFACE_INTROSPECTABLE"'>" " <method name='Introspect'>" " <arg name='xml_data' type='s' direction='out'/>" " </method>" @@ -313,58 +325,58 @@ // introcpection data for SCR node DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<node>" -" <interface name='org.opensuse.yast.SCR.Methods'>" -" <method name='Read'>" +" <interface name='"YAST_SCR_INTERFACE"'>" +" <method name='"METHOD_READ"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='arg' type='(bsv)' direction='in'/>" " <arg name='opt' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='Write'>" +" <method name='"METHOD_WRITE"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='arg' type='(bsv)' direction='in'/>" " <arg name='opt' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='Execute'>" +" <method name='"METHOD_EXECUTE"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='arg' type='(bsv)' direction='in'/>" " <arg name='opt' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='Dir'>" +" <method name='"METHOD_DIR"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='Error'>" +" <method name='"METHOD_ERROR"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='UnregisterAgent'>" +" <method name='"METHOD_UNREGISTER"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='UnregisterAllAgents'>" +" <method name='"METHOD_UNREGISTER_ALL"'>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='RegisterNewAgents'>" +" <method name='"METHOD_REGISTER_NEW"'>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='RegisterAgent'>" +" <method name='"METHOD_REGISTER"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='arg' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <method name='UnmountAgent'>" +" <method name='"METHOD_UNMOUNT"'>" " <arg name='path' type='(bsv)' direction='in'/>" " <arg name='ret' type='(bsv)' direction='out'/>" " </method>" -" <interface name='org.freedesktop.DBus.Introspectable'>" +" </interface>" +" <interface name='"DBUS_INTERFACE_INTROSPECTABLE"'>" " <method name='Introspect'>" " <arg name='xml_data' type='s' direction='out'/>" " </method>" " </interface>" -" </interface>" "</node>"; // create a reply to the request @@ -373,8 +385,8 @@ } else if (request.type() == DBUS_MESSAGE_TYPE_METHOD_CALL) { - y2warning("Ignoring unknown interface or method call: interface: %s, method: %s", - request.interface().c_str(), request.method().c_str()); + y2warning("Ignoring unknown object, interface or method call: object: %s, interface: %s, method: %s", + request.path().c_str(), request.interface().c_str(), request.method().c_str()); // report error reply.createError(request, "Unknown object, interface or method", DBUS_ERROR_UNKNOWN_METHOD); @@ -421,11 +433,12 @@ } #ifdef HAVE_POLKIT +// check if action is allowed by PolicyKit bool DBusServer::isActionAllowed(const std::string &caller, const std::string &path, const std::string &method, const std::string &arg, const std::string &opt) { // create actionId - static const char *polkit_prefix = "org.opensuse.yast.scr"; + static const char *polkit_prefix = POLKIT_PREFIX; // check the access right to all methods at first (see bnc#449794) std::string action_id(PolKit::createActionId(polkit_prefix, "", method, "", "")); @@ -478,8 +491,8 @@ DBusMsg query; // ask the DBus server for the PID of the caller - query.createCall("org.freedesktop.DBus", "/org/freedesktop/DBus/Bus", - "org.freedesktop.DBus", "GetConnectionUnixProcessID"); + query.createCall(DBUS_SERVICE_DBUS, DBUS_PATH_DBUS"/Bus", + DBUS_SERVICE_DBUS, "GetConnectionUnixProcessID"); query.addString(bus_name); 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.18.3/dbus/SCR_service/Makefile.am new/yast2-core-2.18.4/dbus/SCR_service/Makefile.am --- old/yast2-core-2.18.3/dbus/SCR_service/Makefile.am 2009-01-23 16:45:37.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/Makefile.am 2009-02-12 15:55:28.000000000 +0100 @@ -1,8 +1,12 @@ # -# Makefile.am for dbus/service +# Makefile.am for dbus/SCR_service # -EXTRA_DIST=org.opensuse.yast.SCR.service.in org.opensuse.yast.SCR.conf.in org.opensuse.yast.scr.policy +EXTRA_DIST=org.opensuse.yast.SCR.service.in.in \ + org.opensuse.yast.SCR.conf.in \ + org.opensuse.yast.scr.policy \ + scr_names.h.in \ + test_SCR_dbus_server.rb.in AM_CXXFLAGS = -DY2LOG=\"SCR-service\" -DSUSEVERSION=\"${SUSEVERSION}\" @@ -24,35 +28,22 @@ check-local: polkit-policy-file-validate $(polkit_policies_DATA) - # service activation config # FIXME?? dbus pkgconfig provides only 'session_bus_services_dir' dbus_servicesdir = `pkg-config --print-errors --variable prefix dbus-1`/share/dbus-1/system-services -dbus_services_in_files = org.opensuse.yast.SCR.service.in +# Can't use autoconf only because @ybindir@ expands to '${prefix}/...'. +# So must use %YBINDIR% and expand it via sed during make +# Ouch, ouch, ouch +dbus_services_in_files = org.opensuse.yast.SCR.service.in dbus_services_DATA = $(dbus_services_in_files:.service.in=.service) $(dbus_services_DATA): $(dbus_services_in_files) - sed -e "s|\@YBINDIR\@|$(ybindir)|" $< > $@ + sed -e "s|\%YBINDIR\%|$(ybindir)|" $< > $@ # service config dbus_confdir = `pkg-config --print-errors --variable sysconfdir dbus-1`/dbus-1/system.d - -dbus_conf_in_files = org.opensuse.yast.SCR.conf.in - -dbus_conf_DATA = $(dbus_conf_in_files:.conf.in=.conf) - -# set access mode according to the PolicyKit status -# if policykit is disabled only root can access the service -if HAVE_POLKIT -dbus_access_mode=allow -else -dbus_access_mode=deny -endif - -$(dbus_conf_DATA): $(dbus_conf_in_files) - sed -e "s|\@ACCESS_MODE\@|$(dbus_access_mode)|" $< > $@ - +dbus_conf_DATA = org.opensuse.yast.SCR.conf 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.18.3/dbus/SCR_service/org.opensuse.yast.SCR.conf.in new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.conf.in --- old/yast2-core-2.18.3/dbus/SCR_service/org.opensuse.yast.SCR.conf.in 2009-01-26 14:21:45.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.conf.in 2009-02-12 15:55:28.000000000 +0100 @@ -5,16 +5,20 @@ http://lists.opensuse.org/opensuse-packaging/2009-01/msg00132.html https://bugzilla.novell.com/show_bug.cgi?id=468390 --> + +<!-- + Only a root process may start a DBus Service requesting to own YAST_SCR_SERVICE +--> <policy user="root"> - <allow own="org.opensuse.yast.SCR"/> - <allow send_destination="org.opensuse.yast.SCR"/> + <allow own="@YAST_SCR_SERVICE@"/> + <allow send_destination="@YAST_SCR_SERVICE@"/> </policy> <policy context="default"> <!-- allowed iff compiled with PolicyKit --> - <@ACCESS_MODE@ send_destination="org.opensuse.yast.SCR" - send_interface="org.opensuse.yast.SCR.Methods"/> + <@ACCESS_MODE@ send_destination="@YAST_SCR_SERVICE@" + send_interface="@YAST_SCR_INTERFACE@"/> <!-- introspection is allowed --> - <allow send_destination="org.opensuse.yast.SCR" + <allow send_destination="@YAST_SCR_SERVICE@" send_interface="org.freedesktop.DBus.Introspectable" /> </policy> </busconfig> 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.18.3/dbus/SCR_service/org.opensuse.yast.scr.policy new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.scr.policy --- old/yast2-core-2.18.3/dbus/SCR_service/org.opensuse.yast.scr.policy 2009-01-23 16:45:37.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.scr.policy 2009-02-12 15:55:28.000000000 +0100 @@ -29,7 +29,7 @@ </action> <action id="org.opensuse.yast.scr.execute"> - <description>Yast SCR Write Method</description> + <description>Yast SCR Execute Method</description> <message>System policy prevents the Yast SCR service from executing system calls.</message> <defaults> @@ -40,7 +40,7 @@ </action> <action id="org.opensuse.yast.scr.dir"> - <description>Yast SCR Write Method</description> + <description>Yast SCR Dir Method</description> <message>System policy prevents the Yast SCR service from listing agent properties.</message> <defaults> @@ -51,7 +51,7 @@ </action> <action id="org.opensuse.yast.scr.registeragent"> - <description>Yast SCR Write Method</description> + <description>Yast SCR RegisterAgent Method</description> <message>System policy prevents the Yast SCR service from registering a new agent.</message> <defaults> @@ -62,7 +62,7 @@ </action> <action id="org.opensuse.yast.scr.unregisteragent"> - <description>Yast SCR Write Method</description> + <description>Yast SCR UnregisterAgent Method</description> <message>System policy prevents the Yast SCR service from unregistering an agent.</message> <defaults> @@ -73,7 +73,7 @@ </action> <action id="org.opensuse.yast.scr.unmountagent"> - <description>Yast SCR Write Method</description> + <description>Yast SCR UnmountAgent Method</description> <message>System policy prevents the Yast SCR service from unmounting an agent.</message> <defaults> @@ -84,7 +84,7 @@ </action> <action id="org.opensuse.yast.scr.error"> - <description>Yast SCR Write Method</description> + <description>Yast SCR Error Method</description> <message>System policy prevents the Yast SCR service from reading error status.</message> <defaults> @@ -95,7 +95,7 @@ </action> <action id="org.opensuse.yast.scr.unregisterallagents"> - <description>Yast SCR Write Method</description> + <description>Yast SCR UnregisterAllAgents Method</description> <message>System policy prevents the Yast SCR service from unregistering all agents.</message> <defaults> @@ -106,7 +106,7 @@ </action> <action id="org.opensuse.yast.scr.registernewagents"> - <description>Yast SCR Write Method</description> + <description>Yast SCR RegisterNewAgents Method</description> <message>System policy prevents the Yast SCR service from registering new unloaded agents.</message> <defaults> 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.18.3/dbus/SCR_service/org.opensuse.yast.SCR.service.in new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.service.in --- old/yast2-core-2.18.3/dbus/SCR_service/org.opensuse.yast.SCR.service.in 2009-01-23 16:45:37.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.service.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -# DBus service activation config -[D-BUS Service] -Name=org.opensuse.yast.SCR -Exec=@YBINDIR@/SCR_dbus_server -User=root 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.18.3/dbus/SCR_service/org.opensuse.yast.SCR.service.in.in new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.service.in.in --- old/yast2-core-2.18.3/dbus/SCR_service/org.opensuse.yast.SCR.service.in.in 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/org.opensuse.yast.SCR.service.in.in 2009-02-12 15:55:28.000000000 +0100 @@ -0,0 +1,5 @@ +# DBus service activation config +[D-BUS Service] +Name=@YAST_SCR_SERVICE@ +Exec=%YBINDIR%/SCR_dbus_server +User=root 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.18.3/dbus/SCR_service/scr_names.h.in new/yast2-core-2.18.4/dbus/SCR_service/scr_names.h.in --- old/yast2-core-2.18.3/dbus/SCR_service/scr_names.h.in 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/scr_names.h.in 2009-02-12 15:55:28.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * scr_names.h - generated from scr_names.h.in + * + */ + +#define YAST_SCR_SERVICE "@YAST_SCR_SERVICE@" +#define YAST_SCR_INTERFACE "@YAST_SCR_INTERFACE@" + +#define METHOD_READ "Read" +#define METHOD_WRITE "Write" +#define METHOD_EXECUTE "Execute" +#define METHOD_DIR "Dir" +#define METHOD_ERROR "Error" +#define METHOD_REGISTER "RegisterAgent" +#define METHOD_UNREGISTER "UnregisterAgent" +#define METHOD_UNMOUNT "UnmountAgent" +#define METHOD_UNREGISTER_ALL "UnregisterAllAgents" +#define METHOD_REGISTER_NEW "RegisterNewAgents" + +#define SCR_OBJECT_PATH "/SCR" + +#define POLKIT_PREFIX "org.opensuse.yast.scr" 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.18.3/dbus/SCR_service/test_SCR_dbus_server.rb.in new/yast2-core-2.18.4/dbus/SCR_service/test_SCR_dbus_server.rb.in --- old/yast2-core-2.18.3/dbus/SCR_service/test_SCR_dbus_server.rb.in 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-core-2.18.4/dbus/SCR_service/test_SCR_dbus_server.rb.in 2009-03-06 10:30:21.000000000 +0100 @@ -0,0 +1,69 @@ +#!/usr/bin/env ruby + +# +# Test code for SCR_service +# +# test_SCR_dbus_server.rb is generated from test_SCR_dbus_server.rb.in +# +require 'test/unit' + +begin + require "dbus" +rescue Exception => e + $stderr.puts "Please install ruby-dbus" + exit +end + +class DBusTest < Test::Unit::TestCase + def test_loading + # Get the bus + system_bus = DBus::SystemBus.instance + assert system_bus + + # Get the yast service + yast = system_bus.service("@YAST_SCR_SERVICE@") + assert yast + + # Get the object from this service + # (using the root object of the service, for SCR there's just one) + objYast = yast.object("/#{yast.root}") + assert objYast + + # Create a local object for accessing the interface provided by the remote object + # The local application can 'talk' through this object which internally proxies + # all calls to the remote one via DBus. + poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_INTERFACE@") + assert poiSCR + end + def test_throughput + start = Time.now + count = 0 + while (Time.now - start < 1) + system_bus = DBus::SystemBus.instance + assert system_bus + + # Get the yast service + yast = system_bus.service("@YAST_SCR_SERVICE@") + assert yast + + # Get the object from this service + objYast = yast.object("/#{yast.root}") + assert objYast + + poiSCR = DBus::ProxyObjectInterface.new(objYast, "@YAST_SCR_INTERFACE@") + + res = poiSCR.define_method("Execute", "in path:(bsv), in arg:(bsv), in opt:(bsv), out ret:(bsv)") + + begin + r = poiSCR.Execute([false, "path", ["s",".target.bash_output"] ], + [false, "string", ["s","/bin/date +%r"] ], + [false, "", ["s",""] ]) + rescue Exception => e + end + count += 1 + end + elapsed = Time.now - start + persec = count / elapsed + puts "Throughput #{persec.to_i}/sec" + end +end 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.18.3/libycp/src/ExecutionEnvironment.cc new/yast2-core-2.18.4/libycp/src/ExecutionEnvironment.cc --- old/yast2-core-2.18.3/libycp/src/ExecutionEnvironment.cc 2009-01-23 16:45:30.000000000 +0100 +++ new/yast2-core-2.18.4/libycp/src/ExecutionEnvironment.cc 2009-03-06 13:41:36.000000000 +0100 @@ -93,7 +93,7 @@ { if (m_backtrace.size () == m_recursion_limit) { - y2error ("Recursion limit of %d call frames reached. Set the environment variable %s to change this", m_recursion_limit, Y2RECURSIONLIMIT); + y2error ("Recursion limit of %zd call frames reached. Set the environment variable %s to change this", m_recursion_limit, Y2RECURSIONLIMIT); return true; } return false; @@ -128,6 +128,8 @@ // FIXME: omit CallStack::const_reverse_iterator it = m_backtrace.rbegin(); + + y2logger(level, "------------- Backtrace begin -------------"); while (it != m_backtrace.rend()) { @@ -135,6 +137,8 @@ , "", "%s", (*it)->called_function.c_str ()); ++it; }; + + y2logger(level, "------------- Backtrace end ---------------"); } 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.18.3/libycp/testsuite/tests/builtin/Backtrace.err new/yast2-core-2.18.4/libycp/testsuite/tests/builtin/Backtrace.err --- old/yast2-core-2.18.3/libycp/testsuite/tests/builtin/Backtrace.err 2009-01-23 16:45:34.000000000 +0100 +++ new/yast2-core-2.18.4/libycp/testsuite/tests/builtin/Backtrace.err 2009-03-06 14:10:55.000000000 +0100 @@ -21,6 +21,8 @@ } ---------------------------------------------------------------------- [YCP] tests/builtin/Backtrace.ycp:6 My test +[libycp] ExecutionEnvironment.cc(backtrace):132 ------------- Backtrace begin ------------- [YCP] tests/builtin/Backtrace.ycp:10 aoo ((value + 1)) [YCP] tests/builtin/Backtrace.ycp:14 boo ((foo_val + 1)) [YCP] tests/builtin/Backtrace.ycp:17 foo (41) +[libycp] ExecutionEnvironment.cc(backtrace):141 ------------- Backtrace end --------------- 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.18.3/VERSION new/yast2-core-2.18.4/VERSION --- old/yast2-core-2.18.3/VERSION 2009-01-29 15:15:50.000000000 +0100 +++ new/yast2-core-2.18.4/VERSION 2009-03-06 10:53:11.000000000 +0100 @@ -1 +1 @@ -2.18.3 +2.18.4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org