Hello community,
here is the log from the commit of package yast2
checked in at Sat Feb 2 02:06:38 CET 2008.
--------
--- yast2/yast2.changes 2008-01-28 16:44:38.000000000 +0100
+++ yast2/yast2.changes 2008-02-02 02:03:49.826733000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 1 13:00:18 CET 2008 - locilka@suse.cz
+
+- Added new functions into the URL module: MakeMapFromParams and
+ MakeParamsFromMap.
+- Fixed deprecated find() calls in URL module.
+- 2.16.25
+
+-------------------------------------------------------------------
Old:
----
yast2-2.16.24.tar.bz2
New:
----
yast2-2.16.25.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.rV7074/_old 2008-02-02 02:05:51.000000000 +0100
+++ /var/tmp/diff_new_pack.rV7074/_new 2008-02-02 02:05:51.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2 (Version 2.16.24)
+# spec file for package yast2 (Version 2.16.25)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2
-Version: 2.16.24
+Version: 2.16.25
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.16.24.tar.bz2
+Source0: yast2-2.16.25.tar.bz2
Prefix: /usr
Source1: yast2-rpmlintrc
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-perl-bindings yast2-testsuite
@@ -129,7 +129,7 @@
Steffen Winterfeldt
%prep
-%setup -n yast2-2.16.24
+%setup -n yast2-2.16.25
%build
%{prefix}/bin/y2tool y2autoconf
@@ -234,6 +234,11 @@
%doc %{prefix}/share/doc/packages/yast2/wizard
%changelog
+* Fri Feb 01 2008 locilka@suse.cz
+- Added new functions into the URL module: MakeMapFromParams and
+ MakeParamsFromMap.
+- Fixed deprecated find() calls in URL module.
+- 2.16.25
* Mon Jan 28 2008 locilka@suse.cz
- Adjusted SCR agent for SuSEfirewall2 sysconfig file. Values can
use also single quotes, not only double-quotes (bnc#327565).
++++++ yast2-2.16.24.tar.bz2 -> yast2-2.16.25.tar.bz2 ++++++
++++ 3785 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.24/configure.in new/yast2-2.16.25/configure.in
--- old/yast2-2.16.24/configure.in 2008-01-28 13:18:55.000000000 +0100
+++ new/yast2-2.16.25/configure.in 2007-12-10 13:36:52.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2
dnl
-dnl -- This file is generated by y2autoconf 2.16.3 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.2 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.16.24, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.16.17, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.24"
+VERSION="2.16.17"
RPMNAME="yast2"
MAINTAINER="Jiri Srain "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.24/library/control/src/ProductControl.ycp new/yast2-2.16.25/library/control/src/ProductControl.ycp
--- old/yast2-2.16.24/library/control/src/ProductControl.ycp 2008-01-28 15:27:37.000000000 +0100
+++ new/yast2-2.16.25/library/control/src/ProductControl.ycp 2008-01-29 01:08:54.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Product Control routines
* Authors: Anas Nashif
*
- * $Id: ProductControl.ycp 43942 2008-01-28 12:16:51Z locilka $
+ * $Id: ProductControl.ycp 43962 2008-01-28 18:09:16Z locilka $
*/
{
textdomain "base";
@@ -535,25 +535,30 @@
});
});
- UI::WizardCommand(`SetCurrentStep( first_id ) );
+ UI::WizardCommand(`SetCurrentStep( CurrentWizardStep ) );
}
-
-
+/* Forces UpdateWizardSteps to redraw steps even if nothing seem to be changed */
+boolean force_UpdateWizardSteps = false;
/**
* Update Steps
*/
global define void UpdateWizardSteps(list<map> stagemode)
{
+ if (force_UpdateWizardSteps == true) {
+ y2milestone ("UpdateWizardSteps forced");
+ force_UpdateWizardSteps = false;
+ } else if (last_stage_mode == stagemode) {
+ y2milestone ("No changes in Wizard steps");
+ return;
+ }
+
last_stage_mode = stagemode;
UI::WizardCommand(`DeleteSteps());
+ // Also redraws the wizard and sets the current step
AddWizardSteps( stagemode );
- // AddWizardSteps sets the current step itself (which also updates the Wizard)
- // UI::WizardCommand(`SetCurrentStep( CurrentWizardStep ) );
- // UI::WizardCommand(`UpdateSteps());
- return;
}
@@ -565,6 +570,7 @@
if ( size( last_stage_mode ) > 0 )
{
y2debug( "Retranslating wizard steps" );
+ force_UpdateWizardSteps = true;
UpdateWizardSteps( last_stage_mode );
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.24/library/modules/Mode.ycp new/yast2-2.16.25/library/modules/Mode.ycp
--- old/yast2-2.16.24/library/modules/Mode.ycp 2007-10-05 17:05:31.000000000 +0200
+++ new/yast2-2.16.25/library/modules/Mode.ycp 2008-02-01 13:12:50.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Klaus Kaempf
* Flags: Stable
*
- * $Id: Mode.ycp 39088 2007-06-28 19:34:35Z jsrain $
+ * $Id: Mode.ycp 44098 2008-02-01 12:12:49Z locilka $
*
* Provide installation mode information.
* Mostly values from /etc/install.inf
@@ -197,6 +197,10 @@
return mode () == "update";
}
+global boolean Depeche () {
+ return true;
+}
+
/**
* normal, running 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-2.16.24/library/modules/Version.ycp new/yast2-2.16.25/library/modules/Version.ycp
--- old/yast2-2.16.24/library/modules/Version.ycp 2008-01-28 13:19:10.000000000 +0100
+++ new/yast2-2.16.25/library/modules/Version.ycp 2008-02-01 13:17:26.000000000 +0100
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.16.24";
+global string yast2 = "2.16.25";
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.24/library/types/src/URL.ycp new/yast2-2.16.25/library/types/src/URL.ycp
--- old/yast2-2.16.24/library/types/src/URL.ycp 2007-11-27 10:16:20.000000000 +0100
+++ new/yast2-2.16.25/library/types/src/URL.ycp 2008-02-01 13:12:50.000000000 +0100
@@ -6,7 +6,7 @@
* Anas Nashif
* Flags: Stable
*
- * $Id: URL.ycp 42401 2007-11-26 14:34:19Z mzugec $
+ * $Id: URL.ycp 44098 2008-02-01 12:12:49Z locilka $
*/
{
@@ -251,7 +251,7 @@
if(url == nil || size(url) < 1) return false;
/* We don't allow URLs with spaces */
- if(find(url, " ") != -1) return false;
+ if(search(url, " ") != nil) return false;
map tokens = Parse(url);
@@ -329,9 +329,11 @@
}
y2debug("url: %1", url);
- if (tokens["path"]:"" != "" && find (tokens["path"]:"", "/") != 0 )
+ // path is not empty and doesn't start with "/"
+ if (tokens["path"]:"" != "" && ! regexpmatch (tokens["path"]:"", "^/"))
url = sformat("%1/%2", url, EscapeString(tokens["path"]:"", transform_map_filename));
- else if (tokens["path"]:"" != "" && find (tokens["path"]:"", "/") == 0 )
+ // patch is not empty and starts with "/"
+ else if (tokens["path"]:"" != "" && regexpmatch (tokens["path"]:"", "^/"))
{
while (substring (tokens["path"]:"", 0, 2) == "//")
tokens["path"] = substring (tokens["path"]:"", 1);
@@ -418,4 +420,93 @@
y2milestone("%1", Check(nil));
*/
+/**
+ * Reads list of HTTP params and returns them as map.
+ * (Useful also for cd:/, dvd:/, nfs:/ ... params)
+ * Neither keys nor values are HTML-unescaped, see UnEscapeString().
+ *
+ * @params string params
+ * @return map params
+ *
+ * @example
+ * MakeMapFromParams ("device=sda3&login=aaa&password=bbb") -> $[
+ * "device" : "sda3",
+ * "login" : "aaa",
+ * "password" : "bbb"
+ * ]
+ */
+global map MakeMapFromParams (string params) {
+ // Error
+ if (params == nil) {
+ y2error ("Erroneous (nil) params!");
+ return nil;
+ // Empty
+ } else if (params == "") {
+ return $[];
+ }
+
+ list <string> params_list = splitstring (params, "&");
+
+ params_list = filter (string one_param, params_list, {
+ return (one_param != "" && one_param != nil);
+ });
+
+ map ret = $[];
+ integer eq_pos = nil;
+ string opt = "";
+ string val = "";
+
+ foreach (string one_param, params_list, {
+ eq_pos = search (one_param, "=");
+
+ if (eq_pos == nil) {
+ ret[one_param] = "";
+ } else {
+ opt = substring (one_param, 0, eq_pos);
+ val = substring (one_param, (eq_pos + 1));
+
+ ret[opt] = val;
+ }
+ });
+
+ return ret;
+}
+
+/**
+ * Returns string made of HTTP params. It's a reverse function to MakeMapFromParams().
+ * Neither keys nor values are HTML-escaped, use EscapeString() if needed.
+ *
+ * @param map
+ *
+ * @see MakeMapFromParams
+ *
+ * @example
+ * MakeMapFromParams ($[
+ * "param1" : "a",
+ * "param2" : "b",
+ * "param3" : "c",
+ * ]) -> "param1=a¶m2=b¶m3=c"
+ */
+global string MakeParamsFromMap (map params_map) {
+ // ["key1=value1", "key2=value2", ...] -> "key1=value1&key2=value2"
+ return mergestring (
+ // ["key" : "value", ...] -> ["key=value", ...]
+ maplist (string key, string value, params_map, {
+ if (value == nil) {
+ y2warning ("Empty value for key %1", key);
+ value = "";
+ }
+
+ if (key == nil || key == "") {
+ y2error ("Empty key (will be skipped)");
+ return "";
+ }
+
+ // "key=value"
+ return sformat ("%1=%2", key, 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-2.16.24/library/wizard/src/Wizard.ycp new/yast2-2.16.25/library/wizard/src/Wizard.ycp
--- old/yast2-2.16.24/library/wizard/src/Wizard.ycp 2008-01-28 15:27:37.000000000 +0100
+++ new/yast2-2.16.25/library/wizard/src/Wizard.ycp 2008-01-29 01:08:54.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Wizard dialog
* Authors: Stefan Hundhammer
*
- * $Id: Wizard.ycp 43947 2008-01-28 14:12:19Z locilka $
+ * $Id: Wizard.ycp 43962 2008-01-28 18:09:16Z locilka $
*
* Provides the wizard dialog (common screen for all YaST2 installation
* modules) and functions to set the contents, to replace and restore
@@ -999,10 +999,13 @@
{
if ( UI::WizardCommand(`EnableNextButton( false ) ) == false )
{
- if ( UI::WidgetExists(`id(`next ) ) )
- UI::ChangeWidget(`id(`next), `Enabled, false );
- else
- UI::ChangeWidget(`id(`accept), `Enabled, false );
+ if (UI::WidgetExists (`id (`next))) {
+ UI::ChangeWidget(`id (`next), `Enabled, false);
+ } else if (UI::WidgetExists (`id (`accept))) {
+ UI::ChangeWidget(`id (`accept), `Enabled, false);
+ } else {
+ y2error (-1, "Neither `next nor `accept widgets exist");
+ }
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-2.16.24/VERSION new/yast2-2.16.25/VERSION
--- old/yast2-2.16.24/VERSION 2008-01-28 13:04:45.000000000 +0100
+++ new/yast2-2.16.25/VERSION 2008-02-01 13:01:21.000000000 +0100
@@ -1 +1 @@
-2.16.24
+2.16.25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org