[yast-commit] r45857 - in /trunk/core: VERSION package/yast2-core.changes scr/src/ScriptingAgent.cc
Author: mvidner Date: Fri Mar 28 17:25:19 2008 New Revision: 45857 URL: http://svn.opensuse.org/viewcvs/yast?rev=45857&view=rev Log: Lazy SCR: to better suit the current naming scheme, to get .foo.bar look for foo_bar.scr instead of foo.bar.scr Lazy SCR: when sweeping, warn in the log Modified: trunk/core/VERSION trunk/core/package/yast2-core.changes trunk/core/scr/src/ScriptingAgent.cc Modified: trunk/core/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/VERSION?rev=45857&r1=45856&r2=45857&view=diff ============================================================================== --- trunk/core/VERSION (original) +++ trunk/core/VERSION Fri Mar 28 17:25:19 2008 @@ -1 +1 @@ -2.16.40 +2.16.41 Modified: trunk/core/package/yast2-core.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/package/yast2-core.changes?rev=45857&r1=45856&r2=45857&view=diff ============================================================================== --- trunk/core/package/yast2-core.changes (original) +++ trunk/core/package/yast2-core.changes Fri Mar 28 17:25:19 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Fri Mar 28 17:22:19 CET 2008 - mvidner@suse.cz + +- Lazy SCR: to better suit the current naming scheme, to get .foo.bar + look for foo_bar.scr instead of foo.bar.scr +- Lazy SCR: when sweeping, warn in the log +- 2.16.41 + +------------------------------------------------------------------- Wed Mar 5 09:58:00 CET 2008 - locilka@suse.cz - Extended .process agent with 'buffer_empty' function that returns Modified: trunk/core/scr/src/ScriptingAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/scr/src/ScriptingAgent.cc?rev=45857&r1=45856&r2=45857&view=diff ============================================================================== --- trunk/core/scr/src/ScriptingAgent.cc (original) +++ trunk/core/scr/src/ScriptingAgent.cc Fri Mar 28 17:25:19 2008 @@ -415,7 +415,7 @@ void ScriptingAgent::Sweep () { - y2debug ("Scripting agent sweeping"); + y2warning ("Scripting agent sweeping"); for (int level = 0; level < Y2PathSearch::numberOfComponentLevels (); level++) { @@ -435,12 +435,27 @@ return YCPBoolean (true); } +// return a copy of s where each a is replaced by b +static +string +tr (const string & s, char a, char b) +{ + char * sc = strdup (s.c_str ()); + for (char * p = sc; *p; ++p) { + if (*p == a) + *p = b; + } + string ret = sc; + free (sc); + return ret; +} // cannot return "success" because we can register an unrelated path void ScriptingAgent::tryRegister (const YCPPath &path) { - string basename = path->toString().substr(1) + ".scr"; // skip "." + // .foo.bar.baz becomes foo_bar_baz.scr + string basename = tr (path->toString().substr(1), '.', '_') + ".scr"; list<RegistrationDir>::iterator i = registration_dirs.begin(), -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mvidner@svn.opensuse.org