commit yast2 for openSUSE:Factory
Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at Fri May 1 00:19:13 CEST 2009. -------- --- yast2/yast2.changes 2009-04-07 15:38:41.000000000 +0200 +++ yast2/yast2.changes 2009-04-29 09:25:45.000000000 +0200 @@ -1,0 +2,32 @@ +Wed Apr 29 09:15:49 CEST 2009 - lslezak@suse.cz + +- media change popup - display also the URL in the short summary + (bnc#439069) +- 2.18.15 + +------------------------------------------------------------------- +Tue Apr 28 15:18:49 CEST 2009 - lslezak@suse.cz + +- URL.ycp - escape also non-ASCII characters in URL, added + URLRecode.pm module (bnc#446395) +- URL.ycp - fixed processing of smb:// URLs (bnc#495109) + +------------------------------------------------------------------- +Mon Apr 20 16:11:35 CEST 2009 - jsrain@suse.cz + +- at start-up, check that /sys, /proc and /dev are not empty and + prevent YaST from start if they are (bnc#450643) + +------------------------------------------------------------------- +Thu Apr 9 10:04:19 CEST 2009 - lslezak@suse.cz + +- PackageSystem.ycp - check nil result of Pkg::PkgCommit() call + which indicates an error (bnc#157551) + +------------------------------------------------------------------- +Wed Apr 8 11:27:13 CEST 2009 - lslezak@suse.cz + +- PackageCallbacks.ycp - don't read non existing y2logRPM file + (bnc#456446) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-2.18.14.tar.bz2 New: ---- yast2-2.18.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.Q15923/_old 2009-05-01 00:17:12.000000000 +0200 +++ /var/tmp/diff_new_pack.Q15923/_new 2009-05-01 00:17:12.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2 (Version 2.18.14) +# spec file for package yast2 (Version 2.18.15) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,12 +19,12 @@ Name: yast2 -Version: 2.18.14 +Version: 2.18.15 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-2.18.14.tar.bz2 +Source0: yast2-2.18.15.tar.bz2 Prefix: /usr Source1: yast2-rpmlintrc BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-perl-bindings yast2-testsuite @@ -147,7 +147,7 @@ Steffen Winterfeldt <snwint@suse.de> %prep -%setup -n yast2-2.18.14 +%setup -n yast2-2.18.15 %build %{prefix}/bin/y2tool y2autoconf @@ -250,7 +250,25 @@ %doc %{prefix}/share/doc/packages/yast2/system %doc %{prefix}/share/doc/packages/yast2/types %doc %{prefix}/share/doc/packages/yast2/wizard + %changelog +* Wed Apr 29 2009 lslezak@suse.cz +- media change popup - display also the URL in the short summary + (bnc#439069) +- 2.18.15 +* Tue Apr 28 2009 lslezak@suse.cz +- URL.ycp - escape also non-ASCII characters in URL, added + URLRecode.pm module (bnc#446395) +- URL.ycp - fixed processing of smb:// URLs (bnc#495109) +* Mon Apr 20 2009 jsrain@suse.cz +- at start-up, check that /sys, /proc and /dev are not empty and + prevent YaST from start if they are (bnc#450643) +* Thu Apr 09 2009 lslezak@suse.cz +- PackageSystem.ycp - check nil result of Pkg::PkgCommit() call + which indicates an error (bnc#157551) +* Wed Apr 08 2009 lslezak@suse.cz +- PackageCallbacks.ycp - don't read non existing y2logRPM file + (bnc#456446) * Tue Apr 07 2009 jreidinger@suse.cz - Add to CWM widget for unified table CWMTable - 2.18.14 ++++++ yast2-2.18.14.tar.bz2 -> yast2-2.18.15.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/configure new/yast2-2.18.15/configure --- old/yast2-2.18.14/configure 2009-03-30 11:01:53.000000000 +0200 +++ new/yast2-2.18.15/configure 2009-04-29 09:17:41.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for yast2 2.18.13. +# Generated by GNU Autoconf 2.63 for yast2 2.18.15. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -596,8 +596,8 @@ # Identity of this package. PACKAGE_NAME='yast2' PACKAGE_TARNAME='yast2' -PACKAGE_VERSION='2.18.13' -PACKAGE_STRING='yast2 2.18.13' +PACKAGE_VERSION='2.18.15' +PACKAGE_STRING='yast2 2.18.15' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" @@ -1277,7 +1277,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 2.18.13 to adapt to many kinds of systems. +\`configure' configures yast2 2.18.15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1348,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2 2.18.13:";; + short | recursive ) echo "Configuration of yast2 2.18.15:";; esac cat <<\_ACEOF @@ -1428,7 +1428,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2 configure 2.18.13 +yast2 configure 2.18.15 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1442,7 +1442,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 $as_me 2.18.13, which was +It was created by yast2 $as_me 2.18.15, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2289,7 +2289,7 @@ # Define the identity of the package. PACKAGE='yast2' - VERSION='2.18.13' + VERSION='2.18.15' cat >>confdefs.h <<_ACEOF @@ -2513,7 +2513,7 @@ -VERSION="2.18.13" +VERSION="2.18.15" RPMNAME="yast2" MAINTAINER="Jiri Srain <jsrain@suse.cz>" @@ -3574,7 +3574,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2 $as_me 2.18.13, which was +This file was extended by yast2 $as_me 2.18.15, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3624,7 +3624,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -yast2 config.status 2.18.13 +yast2 config.status 2.18.15 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/configure.in new/yast2-2.18.15/configure.in --- old/yast2-2.18.14/configure.in 2009-03-30 11:01:49.000000000 +0200 +++ new/yast2-2.18.15/configure.in 2009-04-29 09:17:37.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2, 2.18.13, http://bugs.opensuse.org/, yast2) +AC_INIT(yast2, 2.18.15, 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.18.13" +VERSION="2.18.15" RPMNAME="yast2" MAINTAINER="Jiri Srain <jsrain@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/cwm/src/CWMTable.ycp new/yast2-2.18.15/library/cwm/src/CWMTable.ycp --- old/yast2-2.18.14/library/cwm/src/CWMTable.ycp 2009-04-02 15:07:53.000000000 +0200 +++ new/yast2-2.18.15/library/cwm/src/CWMTable.ycp 2009-04-10 12:04:42.000000000 +0200 @@ -328,9 +328,9 @@ ? `VBox ( `VStretch (), // push button - `PushButton (`id (`_tw_up), `opt(`notify,`immediate), _("&Up")), + `PushButton (`id (`_tw_up), `opt(`notify), _("&Up")), // push button - `PushButton (`id (`_tw_down), `opt(`notify,`immediate), _("&Down")), + `PushButton (`id (`_tw_down), `opt(`notify), _("&Down")), `VStretch () ) : `HSpacing (0); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/modules/Version.ycp new/yast2-2.18.15/library/modules/Version.ycp --- old/yast2-2.18.14/library/modules/Version.ycp 2009-04-07 15:33:39.000000000 +0200 +++ new/yast2-2.18.15/library/modules/Version.ycp 2009-04-29 09:17:51.000000000 +0200 @@ -20,7 +20,7 @@ /** * Version of the yast2 package */ -global string yast2 = "2.18.14"; +global string yast2 = "2.18.15"; /* EOF */ } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/packages/src/PackageCallbacks.ycp new/yast2-2.18.15/library/packages/src/PackageCallbacks.ycp --- old/yast2-2.18.14/library/packages/src/PackageCallbacks.ycp 2009-03-30 11:04:43.000000000 +0200 +++ new/yast2-2.18.15/library/packages/src/PackageCallbacks.ycp 2009-04-29 09:17:32.000000000 +0200 @@ -7,7 +7,7 @@ * * Purpose: provides the default Callbacks for Pkg:: * - * $Id: PackageCallbacks.ycp 56393 2009-03-25 15:43:11Z lslezak $ + * $Id: PackageCallbacks.ycp 57018 2009-04-29 07:17:31Z lslezak $ * */ @@ -547,11 +547,6 @@ { y2milestone("DonePackage(error: %1, reason: '%2')", error, reason); - string infopath = (string) SCR::Read (.target.tmpdir) + "/rpmlog"; - SCR::Execute (.target.bash, "/usr/bin/tail '" + String::Quote (Installation::destdir) - + Directory::logdir + "/y2logRPM' > " + infopath); - string info = reason + "\n---\n" + (string) SCR::Read (.target.string, [infopath, "-?-"]); - string message = sformat ( _deleting_package ? // error popup during package installation, %1 is the name of the package _("Removal of package %1 failed.") @@ -561,7 +556,7 @@ if (Mode::commandline()) { CommandLine::Print(message); - CommandLine::Print(info); + CommandLine::Print(reason); // ask user in the interactive mode if (CommandLine::Interactive()) @@ -599,7 +594,7 @@ if ( showLongInfo ) { UI::OpenDialog( `opt(`decorated), LayoutPopup (message, button_box, 10, true) ); - UI::ReplaceWidget(`id(`info), `RichText (`opt(`plainText), info) ); + UI::ReplaceWidget(`id(`info), `RichText (`opt(`plainText), reason) ); } else { @@ -616,7 +611,7 @@ showLongInfo = ShowLogInfo (message, button_box); if (showLongInfo) { - UI::ReplaceWidget(`id(`info), `RichText (`opt(`plainText), info) ); + UI::ReplaceWidget(`id(`info), `RichText (`opt(`plainText), reason) ); } else { @@ -645,6 +640,16 @@ // default: ignore } + else + { + // no error, there is additional info (rpm output), see bnc#456446 + y2milestone("Additional RPM otput: %1", reason); + + if (Mode::commandline()) + { + CommandLine::Print(reason); + } + } return "I"; } @@ -792,17 +797,19 @@ // with network repository it doesn't make sense to ask for disk if (url_scheme == "dir") { - // report error while accessing local directory with product (%1 == "SuSE Linux ...") + // report error while accessing local directory with product (%1 = URL, %2 = "SuSE Linux ...") message = sformat (_("Cannot access installation media -%1. -Check whether the directory is accessible."), wanted_label); +%1 +%2. +Check whether the directory is accessible."), URL::HidePassword(url), wanted_label); } else if (url_scheme != "cd" && url_scheme != "dvd") { - // report error while accessing network media of product (%1 == "SuSE Linux ...") + // report error while accessing network media of product (%1 = URL, %2 = "SuSE Linux ...") message = sformat (_("Cannot access installation media -%1. -Check whether the server is accessible."), wanted_label); +%1 +%2. +Check whether the server is accessible."), URL::HidePassword(url), wanted_label); } // currently unused diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/packages/src/PackageSystem.ycp new/yast2-2.18.15/library/packages/src/PackageSystem.ycp --- old/yast2-2.18.14/library/packages/src/PackageSystem.ycp 2009-04-07 15:30:38.000000000 +0200 +++ new/yast2-2.18.15/library/packages/src/PackageSystem.ycp 2009-04-09 14:35:41.000000000 +0200 @@ -6,7 +6,7 @@ * Michal Svec <msvec@suse.cz> * Flags: Stable * - * $Id: PackageSystem.ycp 56617 2009-04-03 11:55:57Z lslezak $ + * $Id: PackageSystem.ycp 56733 2009-04-09 12:35:41Z lslezak $ * * The documentation is maintained at * <a href="../index.html">.../docs/index.html</a>. @@ -315,7 +315,7 @@ //[int successful, list failed, list remaining, list srcremaining] list result = Pkg::PkgCommit (0); y2debug ("PkgCommit: %1", result); - if(result[1]:[] != []) { + if(result == nil || result[1]:[] != []) { y2error("Package commit failed: %1", result[1]:[]); return false; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/src/Makefile.am new/yast2-2.18.15/library/types/src/Makefile.am --- old/yast2-2.18.14/library/types/src/Makefile.am 2008-06-05 10:41:40.000000000 +0200 +++ new/yast2-2.18.15/library/types/src/Makefile.am 2009-04-27 16:44:37.000000000 +0200 @@ -1,6 +1,6 @@ # Makefile.am for yast2/library/types/src -module_DATA = $(wildcard *.ycp) +module_DATA = $(wildcard *.ycp) $(wildcard *.pm) EXTRA_DIST = $(module_DATA) include $(top_srcdir)/Makefile.am.common diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/src/Makefile.in new/yast2-2.18.15/library/types/src/Makefile.in --- old/yast2-2.18.14/library/types/src/Makefile.in 2009-03-30 11:01:58.000000000 +0200 +++ new/yast2-2.18.15/library/types/src/Makefile.in 2009-04-29 09:17:48.000000000 +0200 @@ -179,7 +179,7 @@ ydatadir = @ydatadir@ yncludedir = @yncludedir@ ystartupdir = @ystartupdir@ -module_DATA = $(wildcard *.ycp) +module_DATA = $(wildcard *.ycp) $(wildcard *.pm) EXTRA_DIST = $(module_DATA) modulebin_DATA = $(patsubst %.ycp,%.ybc,$(module_DATA)) modulebindir = $(moduledir) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/src/URLRecode.pm new/yast2-2.18.15/library/types/src/URLRecode.pm --- old/yast2-2.18.14/library/types/src/URLRecode.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-2.18.15/library/types/src/URLRecode.pm 2009-04-28 14:12:28.000000000 +0200 @@ -0,0 +1,87 @@ +#!/usr/bin/perl -w +# +# Author: Ladislav Slezák <lslezak@novell.com> +# +# $Id:$ +# +# URLRecode.pm +# +# This is a replacement for URI::Encode perl module which cannot be used in inst-sys +# and to decrease the package dependencies +# + +package URLRecode; + +use strict; +use YaST::YCP qw(:LOGGING Boolean sformat);; + +our %TYPEINFO; +use strict; + +# local cache for char -> hex string conversion +our %escape_cache; + +# fill the cache +sub InitCache +{ + for(0..255) {$escape_cache{chr($_)} = sprintf("%%%02x", $_);} +} + + +# Escape password, user name and fragment part of URL string +# @param input input string +# @return string Escaped string +BEGIN{ $TYPEINFO{EscapePassword} = ["function", "string", "string"];} +sub EscapePassword +{ + my ($self, $escaped) = @_; + + if (!defined %escape_cache) { InitCache(); } + + $escaped =~ s/([^A-Za-z0-9\\-_.!~*'()])/$escape_cache{$1}/ge; + return $escaped; +} + +# Escape path part of URL string +# @param input input string +# @return string Escaped string +BEGIN{ $TYPEINFO{EscapePath} = ["function", "string", "string"];} +sub EscapePath +{ + my ($self, $escaped) = @_; + + if (!defined %escape_cache) { InitCache() }; + + $escaped =~ s/([^A-Za-z0-9\-_.!~*'()\/])/$escape_cache{$1}/ge; + return $escaped; +} + +# Escape query part of URL string +# @param input input string +# @return string Escaped string +BEGIN{ $TYPEINFO{EscapeQuery} = ["function", "string", "string"];} +sub EscapeQuery +{ + my ($self, $escaped) = @_; + + if (!defined %escape_cache) { InitCache(); } + + $escaped =~ s/([^A-Za-z0-9\\-_.!~*'()\/:=&])/$escape_cache{$1}/ge; + return $escaped; +} + + +# UnEscape an URL string, replace %<Hexnum><HexNum> sequences +# by character +# @param input input string +# @return string Unescaped string +BEGIN{ $TYPEINFO{UnEscape} = ["function", "string", "string"];} +sub UnEscape +{ + my ($self, $input) = @_; + + $input =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge; + return $input +} + +1; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/src/URL.ycp new/yast2-2.18.15/library/types/src/URL.ycp --- old/yast2-2.18.14/library/types/src/URL.ycp 2009-01-27 15:03:44.000000000 +0100 +++ new/yast2-2.18.15/library/types/src/URL.ycp 2009-04-28 17:09:56.000000000 +0200 @@ -6,7 +6,7 @@ * Anas Nashif <nashif@suse.cz> * Flags: Stable * - * $Id: URL.ycp 54779 2009-01-19 17:15:00Z lslezak $ + * $Id: URL.ycp 57013 2009-04-28 15:09:55Z lslezak $ */ { @@ -17,6 +17,7 @@ import "Hostname"; import "String"; import "IP"; +import "URLRecode"; /** * TODO: @@ -149,6 +150,9 @@ return ret; } +global map <string, string> MakeMapFromParams (string params); +global string MakeParamsFromMap (map <string, string> params_map); + /** * Tokenize URL * @param url URL to be parsed @@ -200,9 +204,9 @@ pth = substring (pth, 1); } } - tokens["path"] = UnEscapeString(pth, transform_map_filename); - tokens["query"] = UnEscapeString(rawtokens[5]:"", transform_map_query); - tokens["fragment"] = UnEscapeString(rawtokens[7]:"", transform_map_passwd); + tokens["path"] = URLRecode::UnEscape(pth); + tokens["query"] = URLRecode::UnEscape(rawtokens[5]:""); + tokens["fragment"] = URLRecode::UnEscape(rawtokens[7]:""); /* Extract username:pass@host:port */ list userpass = regexptokenize(rawtokens[2]:"", "^" + @@ -216,8 +220,8 @@ ); y2debug("userpass=%1", userpass); - tokens["user"] = UnEscapeString(userpass[1]:"", transform_map_passwd); - tokens["pass"] = UnEscapeString(userpass[3]:"", transform_map_passwd); + tokens["user"] = URLRecode::UnEscape(userpass[1]:""); + tokens["pass"] = URLRecode::UnEscape(userpass[3]:""); tokens["port"] = userpass[7]:""; if(userpass[5]:"" != "") @@ -241,14 +245,19 @@ } // some exceptions for samba scheme (there is optional extra option "domain") - if (tokens["scheme"]:""=="samba" || tokens["scheme"]:""=="smb"){ - list<string> tmp_list = filter(string row, splitstring(tokens["path"]:"", "/"), {return (size(row)>0);}); - if (size(tmp_list)>1){ - tokens["domain"] = tokens["host"]:""; - tokens["host"] = tmp_list[0]:""; - tokens["path"] = tmp_list[1]:""; - } - else tokens["path"] = deletechars(tokens["path"]:"", "/"); + if (tokens["scheme"]:""=="samba" || tokens["scheme"]:""=="smb") + { + // Note: CUPS uses different URL syntax for Samba printers: + // smb://username:password@workgroup/server/printer + // Fortunately yast2-printer does not use URL.ycp, so we can safely support libzypp syntax only: + // smb://username:passwd@servername/share/path/on/the/share?workgroup=mygroup + + map<string,string> options = MakeMapFromParams(tokens["query"]:""); + + if (haskey(options, "workgroup")) + { + tokens["domain"] = options["workgroup"]:""; + } } y2debug("tokens=%1", tokens); return tokens; @@ -310,6 +319,8 @@ string url = ""; string userpass = ""; + y2debug("URL::Build(): input: %1", tokens); + if(regexpmatch(tokens["scheme"]:"", "^[[:alpha:]]*$")) { /* if (tokens["scheme"]:"" == "samba") url="smb"; @@ -318,22 +329,18 @@ y2debug("url: %1", url); if (tokens["user"]:"" != "") { - userpass = EscapeString(tokens["user"]:"", transform_map_passwd); + userpass = URLRecode::EscapePassword(tokens["user"]:""); y2milestone("Escaped username '%1' => '%2'", tokens["user"]:"", userpass); } if (size(userpass) != 0 && tokens["pass"]:"" != "" ) { - userpass = sformat("%1:%2", userpass, EscapeString(tokens["pass"]:"", transform_map_passwd) ); + userpass = sformat("%1:%2", userpass, URLRecode::EscapePassword(tokens["pass"]:"") ); } if (size(userpass) > 0 ) userpass = userpass + "@"; url = sformat("%1://%2", url, userpass); y2debug("url: %1", url); - if (tokens["scheme"]:"" == "smb" && size(tokens["domain"]:"")>0 ){ - url = sformat("%1%2/", url, tokens["domain"]:""); - } - if(Hostname::CheckFQ(tokens["host"]:"") || IP::Check(tokens["host"]:"")) { // enclose an IPv6 address in square brackets @@ -351,25 +358,36 @@ // 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)); + url = sformat("%1/%2", url, URLRecode::EscapePath(tokens["path"]:"")); // 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); if (tokens["scheme"]:"" == "ftp") { - url = sformat("%1/%%2f%2", url, substring(EscapeString(tokens["path"]:"", transform_map_filename), 1)); + url = sformat("%1/%%2f%2", url, substring(URLRecode::EscapePath(tokens["path"]:""), 1)); } else { - url = sformat("%1%2", url, EscapeString(tokens["path"]:"", transform_map_filename)); + url = sformat("%1%2", url, URLRecode::EscapePath(tokens["path"]:"")); } } y2debug("url: %1", url); + + map<string,string> query_map = MakeMapFromParams(tokens["query"]:""); + + if (tokens["scheme"]:"" == "smb" && size(tokens["domain"]:"")>0 && query_map["workgroup"]:"" != tokens["domain"]:"") + { + query_map["workgroup"] = tokens["domain"]:""; + + tokens["query"] = MakeParamsFromMap(query_map); + } + if (tokens["query"]:"" != "" ) - url = sformat("%1?%2", url, EscapeString(tokens["query"]:"", transform_map_query)); + url = sformat("%1?%2", url, URLRecode::EscapeQuery(tokens["query"]:"")); + if (tokens["fragment"]:"" != "" ) - url = sformat("%1#%2", url, EscapeString(tokens["fragment"]:"", transform_map_passwd)); + url = sformat("%1#%2", url, URLRecode::EscapePassword(tokens["fragment"]:"")); y2debug("url: %1", url); if (!Check(url)) { @@ -377,6 +395,8 @@ return ""; } + y2debug("URL::Build(): result: %1", url); + return url; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/testsuite/tests/URL.out new/yast2-2.18.15/library/types/testsuite/tests/URL.out --- old/yast2-2.18.14/library/types/testsuite/tests/URL.out 2009-01-27 15:03:45.000000000 +0100 +++ new/yast2-2.18.15/library/types/testsuite/tests/URL.out 2009-04-28 16:48:30.000000000 +0200 @@ -21,11 +21,16 @@ Return ftp://ftp.example.com/%2fpath/to/dir Return ftp://ftp.example.com/%2fpath/to/dir Return ftp://ftp.example.com/%2fpath/to/dir +Return ftp://ftp.example.com/%2fpath/to/dir?param1=val1¶m2=val2 +Return dir:///path/to/%c4%9b%c5%a1%c4%8d%c5%99%c5%be%c3%bd%c3%a1%c3%ad%c3%a9/dir Return ftp://[2001:de8:0:f123::1]/%2fpath/to/dir Return http://[2001:de8:0:f123::1]:8080/path/to/dir Return $["fragment":"", "host":"2001:de8:0:f123::1", "pass":"", "path":"/path/to/dir", "port":"", "query":"", "scheme":"http", "user":""] Return $["fragment":"", "host":"2001:de8:0:f123::1", "pass":"password", "path":"/path/to/dir", "port":"8080", "query":"", "scheme":"http", "user":"user"] Return http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir +Return $["domain":"group", "fragment":"", "host":"servername", "pass":"passwd", "path":"/share/path/on/the/share", "port":"", "query":"mountoptions=ro&workgroup=group", "scheme":"smb", "user":"username"] +Return true +Return smb://username:passwd@myserver.com/share%24%24share/path/on/the/share?workgroup=workgroup Return dir:/// Return http://download.opensuse.org/very/log/path/which/will/be/truncated/target_fi... Return http://download.opensuse.org/.../target_file diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/testsuite/tests/URLRecode.out new/yast2-2.18.15/library/types/testsuite/tests/URLRecode.out --- old/yast2-2.18.14/library/types/testsuite/tests/URLRecode.out 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-2.18.15/library/types/testsuite/tests/URLRecode.out 2009-04-28 14:17:46.000000000 +0200 @@ -0,0 +1,7 @@ +Return nil +Return +Return /%40%23%24%25%5e%26/dir/%c4%8d%c3%bd%c4%9b%c5%a1%c4%8d%c3%bd%c3%a1/file +Return true +Return %20!%40%23%24%25%5e%26*()/%3f%2b%3d +Return %20!%40%23%24%25^%26*()%2f%3f%2b%3d +Return %20!%40%23%24%25^&*()/%3f%2b= diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/testsuite/tests/URLRecode.ycp new/yast2-2.18.15/library/types/testsuite/tests/URLRecode.ycp --- old/yast2-2.18.14/library/types/testsuite/tests/URLRecode.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-2.18.15/library/types/testsuite/tests/URLRecode.ycp 2009-04-28 14:17:43.000000000 +0200 @@ -0,0 +1,27 @@ +/** + * Testsuite for URLRecode.pm module + * + * $Id:$ + */ + +{ + +include "testsuite.ycp"; +import "URLRecode"; + + +TEST(``(URLRecode::EscapePath(nil)), [], nil); +TEST(``(URLRecode::EscapePath("")), [], nil); + +string test_path = "/@#$%^&/dir/čýěščýá/file"; + +TEST(``(URLRecode::EscapePath(test_path)), [], nil); +TEST(``(URLRecode::UnEscape(URLRecode::EscapePath(test_path)) == test_path), [], nil); + + +TEST(``(URLRecode::EscapePath(" !@#$%^&*()/?+=")), [], nil); +TEST(``(URLRecode::EscapePassword(" !@#$%^&*()/?+=")), [], nil); +TEST(``(URLRecode::EscapeQuery(" !@#$%^&*()/?+=")), [], nil); + +/* EOF */ +} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/library/types/testsuite/tests/URL.ycp new/yast2-2.18.15/library/types/testsuite/tests/URL.ycp --- old/yast2-2.18.14/library/types/testsuite/tests/URL.ycp 2009-01-27 15:03:45.000000000 +0100 +++ new/yast2-2.18.15/library/types/testsuite/tests/URL.ycp 2009-04-28 17:09:56.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: XXXXXX * Author: Michal Svec <msvec@suse.cz> * - * $Id: URL.ycp 54779 2009-01-19 17:15:00Z lslezak $ + * $Id: URL.ycp 57013 2009-04-28 15:09:55Z lslezak $ */ { @@ -50,6 +50,10 @@ TEST(``(URL::Build($["scheme":"ftp","host":"ftp.example.com","path":"/path/to/dir"])), [], nil); TEST(``(URL::Build($["scheme":"ftp","host":"ftp.example.com","path":"//path/to/dir"])), [], nil); TEST(``(URL::Build($["scheme":"ftp","host":"ftp.example.com","path":"///path/to/dir"])), [], nil); +TEST(``(URL::Build($["scheme":"ftp","host":"ftp.example.com","path":"///path/to/dir", "query" : "param1=val1¶m2=val2" ])), [], nil); + +// bnc #446395 - non-ASCII chars in path must be escaped +TEST(``(URL::Build($["scheme":"dir", "path":"/path/to/ěščřžýáíé/dir"])), [], nil); // IPv6 tests TEST(``(URL::Build($["scheme":"ftp","host":"2001:de8:0:f123::1","path":"///path/to/dir"])), [], nil); @@ -58,6 +62,13 @@ TEST(``(URL::Parse("http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir")), [], nil); TEST(``(URL::Build(URL::Parse("http://user:password@[2001:de8:0:f123::1]:8080/path/to/dir"))), [], nil); +// smb:// tests +string smb_url = "smb://username:passwd@servername/share/path/on/the/share?mountoptions=ro&workgroup=group"; +TEST(``(URL::Parse(smb_url)), [], nil); +// parse->build must return the orginal value +TEST(``(URL::Build(URL::Parse(smb_url)) == smb_url), [], nil); +// bnc#491482 +TEST(``(URL::Build( $["domain":"workgroup", "host":"myserver.com", "pass":"passwd", "path":"/share$$share/path/on/the/share", "scheme":"smb", "user":"username"])), [], nil); TEST(``(URL::Build(URL::Parse("dir:///"))), [], nil); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/Makefile.am new/yast2-2.18.15/Makefile.am --- old/yast2-2.18.14/Makefile.am 2009-03-30 11:01:49.000000000 +0200 +++ new/yast2-2.18.15/Makefile.am 2009-04-29 09:17:37.000000000 +0200 @@ -32,10 +32,10 @@ # less strict; prefer bzip2 AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip -# where devtools instal m4 snippets +# where devtools install m4 snippets # argh, executed literally #ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal -ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal +ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common cmp -s $< $@ || cp -f $< $@ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/Makefile.in new/yast2-2.18.15/Makefile.in --- old/yast2-2.18.14/Makefile.in 2009-03-30 11:01:59.000000000 +0200 +++ new/yast2-2.18.15/Makefile.in 2009-04-29 09:17:49.000000000 +0200 @@ -229,10 +229,10 @@ # less strict; prefer bzip2 AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip -# where devtools instal m4 snippets +# where devtools install m4 snippets # argh, executed literally #ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal -ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal +ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal CLEANFILES = MAINTAINERCLEANFILES = package/$(RPMNAME)-$(VERSION).tar.bz2 package/$(RPMNAME).spec POT_DST = $(shell find -type d -name testsuite -prune , \ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/scripts/yast2 new/yast2-2.18.15/scripts/yast2 --- old/yast2-2.18.14/scripts/yast2 2009-03-30 11:04:43.000000000 +0200 +++ new/yast2-2.18.15/scripts/yast2 2009-04-21 19:40:55.000000000 +0200 @@ -30,6 +30,16 @@ . $YAST_PREFIX/lib/YaST2/bin/yast2-funcs +# check that system directories are non-empty - bnc #450643 +mount_ok=1; +test -z `ls /proc |head -n1` && echo "The /proc filesystem is not mounted." && mount_ok=0; +test -z `ls /sys |head -n1` && echo "The /sys filesystem is not mounted." && mount_ok=0; +test -z `ls /dev |head -n1` && echo "The /dev filesystem is not mounted." && mount_ok=0; +if test $mount_ok -eq 0 ; then + echo "If you are running in a chroot environment, bind-mount missing filesystems."; + exit 1; +fi + # #211392, #265263 # if we are in X and do not have _input_ from terminal, # save the output and display it via xmessage in case of error. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.18.14/VERSION new/yast2-2.18.15/VERSION --- old/yast2-2.18.14/VERSION 2009-04-07 15:31:17.000000000 +0200 +++ new/yast2-2.18.15/VERSION 2009-04-29 09:17:17.000000000 +0200 @@ -1 +1 @@ -2.18.14 +2.18.15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de