commit yast2 for openSUSE:Factory
Hello community, here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2013-02-23 08:10:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2 (Old) and /work/SRC/openSUSE:Factory/.yast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2", Maintainer is "yast2-maintainers@suse.de" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2013-01-21 07:01:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2013-02-23 08:10:29.000000000 +0100 @@ -1,0 +2,13 @@ +Wed Feb 13 18:10:19 CET 2013 - aschnell@suse.de + +- added CommandLine::PrintTable, String::Repeat and + String::SuperPad +- 2.23.21 + +------------------------------------------------------------------- +Fri Feb 1 08:55:18 UTC 2013 - lslezak@suse.cz + +- added perl-XML-XPath dependency (needed by RegistrationStatus.pm) +- 2.23.20 + +------------------------------------------------------------------- Old: ---- yast2-2.23.19.tar.bz2 New: ---- yast2-2.23.21.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.cBwvg8/_old 2013-02-23 08:10:31.000000000 +0100 +++ /var/tmp/diff_new_pack.cBwvg8/_new 2013-02-23 08:10:31.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 2.23.19 +Version: 2.23.21 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -58,8 +58,10 @@ Requires: yast2-xml # for SLPAPI.pm Requires: yast2-perl-bindings -# for ag_anyxml, RegistrationStatus.pm +# for ag_anyxml Requires: perl-XML-Simple +# RegistrationStatus.pm +Requires: perl-XML-XPath # for GPG.ycp Requires: gpg2 # for Punycode.ycp (bnc#651893) ++++++ yast2-2.23.19.tar.bz2 -> yast2-2.23.21.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/Makefile.in new/yast2-2.23.21/Makefile.in --- old/yast2-2.23.19/Makefile.in 2013-01-18 10:13:29.000000000 +0100 +++ new/yast2-2.23.21/Makefile.in 2013-02-22 10:46:48.000000000 +0100 @@ -687,7 +687,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/VERSION new/yast2-2.23.21/VERSION --- old/yast2-2.23.19/VERSION 2013-01-17 16:59:55.000000000 +0100 +++ new/yast2-2.23.21/VERSION 2013-02-22 10:46:36.000000000 +0100 @@ -1 +1 @@ -2.23.19 +2.23.21 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/configure new/yast2-2.23.21/configure --- old/yast2-2.23.19/configure 2013-01-18 10:13:29.000000000 +0100 +++ new/yast2-2.23.21/configure 2013-02-22 10:46:47.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2 2.23.19. +# Generated by GNU Autoconf 2.69 for yast2 2.23.21. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2' PACKAGE_TARNAME='yast2' -PACKAGE_VERSION='2.23.19' -PACKAGE_STRING='yast2 2.23.19' +PACKAGE_VERSION='2.23.21' +PACKAGE_STRING='yast2 2.23.21' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1250,7 +1250,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.23.19 to adapt to many kinds of systems. +\`configure' configures yast2 2.23.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1321,7 +1321,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2 2.23.19:";; + short | recursive ) echo "Configuration of yast2 2.23.21:";; esac cat <<\_ACEOF @@ -1401,7 +1401,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2 configure 2.23.19 +yast2 configure 2.23.21 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1418,7 +1418,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.23.19, which was +It was created by yast2 $as_me 2.23.21, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2357,7 +2357,7 @@ # Define the identity of the package. PACKAGE='yast2' - VERSION='2.23.19' + VERSION='2.23.21' cat >>confdefs.h <<_ACEOF @@ -2480,7 +2480,7 @@ -VERSION="2.23.19" +VERSION="2.23.21" RPMNAME="yast2" MAINTAINER="YaST2 Maintainers <yast2-maintainers@suse.de>" @@ -3522,7 +3522,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.23.19, which was +This file was extended by yast2 $as_me 2.23.21, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3575,7 +3575,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2 config.status 2.23.19 +yast2 config.status 2.23.21 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/configure.in new/yast2-2.23.21/configure.in --- old/yast2-2.23.19/configure.in 2013-01-18 10:13:25.000000000 +0100 +++ new/yast2-2.23.21/configure.in 2013-02-22 10:46:43.000000000 +0100 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2, 2.23.19, http://bugs.opensuse.org/, yast2) +AC_INIT(yast2, 2.23.21, 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.23.19" +VERSION="2.23.21" RPMNAME="yast2" MAINTAINER="YaST2 Maintainers <yast2-maintainers@suse.de>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/commandline/src/CommandLine.ycp new/yast2-2.23.21/library/commandline/src/CommandLine.ycp --- old/yast2-2.23.19/library/commandline/src/CommandLine.ycp 2013-01-15 14:46:24.000000000 +0100 +++ new/yast2-2.23.21/library/commandline/src/CommandLine.ycp 2013-02-22 10:46:36.000000000 +0100 @@ -36,6 +36,7 @@ import "Stage"; import "Report"; import "String"; + import "Integer"; import "TypeRepository"; import "XML"; @@ -219,6 +220,82 @@ } + /** + * @short Print a Table + * @descr Print a table using Print(). Format of table is as libyui but not all features + * are supported, e.g. no icons. + * + * @param header header of table in libyui format + * @param content content of table in libyui format + */ + global void PrintTable(term header, list<term> content) + { + list<symbol> aligns = []; + list<integer> widths = []; + + list<string> Process(term line) + { + list<string> ret = []; + list<any> anys = argsof(line); + foreach(any a, anys, { + if (is(a, string)) { + string s = (string) a; + ret = add(ret, s); + } + else if (is(a, term)) { + term t = (term) a; + if (contains([`Left, `Center, `Right], symbolof(t))) + ret = add(ret, argsof(t)[0]:""); + } + }); + return ret; + } + + void GetAligns(term header) + { + list<any> anys = argsof(header); + foreach(integer i, Integer::Range(size(anys)), { + any a = anys[i]:nil; + if (is(a, term)) + { + term t = (term) a; + if (symbolof(t) == `Right) + aligns[i] = `right; + } + }); + } + + void UpdateWidths(list<string> columns) + { + foreach(integer i, Integer::Range(size(columns)), { + widths[i] = Integer::Max([ widths[i]:0, size(columns[i]:"") ]); + }); + } + + void PrintLine(term line) + { + list<string> columns = Process(line); + foreach(integer i, Integer::Range(size(columns)), { + columns[i] = String::SuperPad(columns[i]:"", widths[i]:0, " ", aligns[i]:`left); + }); + CommandLine::Print(mergestring(columns, " | ")); + } + + UpdateWidths(Process(header)); + foreach(term row, content, { UpdateWidths(Process(row)); }); + + PrintLine(header); + + GetAligns(header); + + CommandLine::Print(mergestring(maplist(integer width, widths, { + return String::Repeat("-", width); + }), "-+-")); + + foreach(term row, content, { PrintLine(row); }); + } + + /** * @short Print an Error Message * @descr Print an error message and add the description how to get the help. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/modules/Version.ycp new/yast2-2.23.21/library/modules/Version.ycp --- old/yast2-2.23.19/library/modules/Version.ycp 2013-01-18 10:13:34.000000000 +0100 +++ new/yast2-2.23.21/library/modules/Version.ycp 2013-02-22 10:46:54.000000000 +0100 @@ -20,7 +20,7 @@ /** * Version of the yast2 package */ -global string yast2 = "2.23.19"; +global string yast2 = "2.23.21"; /* EOF */ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/network/src/SuSEFirewall.ycp new/yast2-2.23.21/library/network/src/SuSEFirewall.ycp --- old/yast2-2.23.19/library/network/src/SuSEFirewall.ycp 2013-01-15 14:46:24.000000000 +0100 +++ new/yast2-2.23.21/library/network/src/SuSEFirewall.ycp 2013-01-22 12:22:06.000000000 +0100 @@ -51,7 +51,7 @@ // <!-- SuSEFirewall VARIABLES //--> - string susefirewall_package = "SuSEfirewall2"; + global const string FIREWALL_PACKAGE = "SuSEfirewall2"; /** * configuration hasn't been read for the default @@ -1007,11 +1007,11 @@ // In mode normal, package can be installed on request // if required by the module if (check_and_install_package && Mode::normal()) { - needed_packages_installed = PackageSystem::CheckAndInstallPackages ([susefirewall_package]); + needed_packages_installed = PackageSystem::CheckAndInstallPackages ([FIREWALL_PACKAGE]); y2milestone ("CheckAndInstallPackages -> %1", needed_packages_installed); // In mode install/update network might be down } else { - needed_packages_installed = PackageSystem::Installed (susefirewall_package); + needed_packages_installed = PackageSystem::Installed (FIREWALL_PACKAGE); y2milestone ("Installed -> %1", needed_packages_installed); } } else if (needed_packages_installed == false) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/types/src/String.ycp new/yast2-2.23.21/library/types/src/String.ycp --- old/yast2-2.23.19/library/types/src/String.ycp 2013-01-15 14:46:24.000000000 +0100 +++ new/yast2-2.23.21/library/types/src/String.ycp 2013-02-22 10:46:36.000000000 +0100 @@ -339,6 +339,59 @@ return output; } + +/** + * Repeat a string + * + * Repeat a string number of times. + * + * @param input string to repeat + * @param input number number of repetitions + * @return string repeated string + */ +global string Repeat(string text, integer number) +{ + if (text == nil) + text = ""; + + string ret = ""; + + while (number > 0) + { + ret = ret + text; + number = number - 1; + } + + return ret; +} + + +/** + * Add the padding character around the text to make it long enough + * + * Add the padding character around the text to make it long enough. If the + * text is longer than requested, no changes are made. + * + * @param text text to be padded + * @param length requested length + * @param padding padding character + * @param alignment alignment to use, either `left or `right + * @return padded text + */ +global string SuperPad(string text, integer length, string padding, symbol alignment) +{ + if (text == nil) + text = ""; + + string pad = Repeat(padding, length - size(text)); + + if (alignment == `right) + return pad + text; + else + return text + pad; +} + + /** * Add spaces after the text to make it long enough * @@ -349,17 +402,9 @@ * @param length requested length * @return padded text */ -global define string Pad(string text, integer length) { - if(text == nil) text = ""; - - integer rest = length - size(text); - string pad = ""; - while(rest > 0) { - pad = pad + " "; - rest = rest - 1; - } - - return text + pad; +global string Pad(string text, integer length) +{ + return SuperPad(text, length, " ", `left); } /** @@ -372,17 +417,9 @@ * @param length requested length * @return padded text */ -global define string PadZeros(string text, integer length) { - if(text == nil) text = ""; - - integer rest = length - size(text); - string pad = ""; - while(rest > 0) { - pad = pad + "0"; - rest = rest - 1; - } - - return pad + text; +global string PadZeros(string text, integer length) +{ + return SuperPad(text, length, "0", `right); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/types/testsuite/tests/String.out new/yast2-2.23.21/library/types/testsuite/tests/String.out --- old/yast2-2.23.19/library/types/testsuite/tests/String.out 2013-01-15 14:46:24.000000000 +0100 +++ new/yast2-2.23.21/library/types/testsuite/tests/String.out 2013-02-22 10:46:36.000000000 +0100 @@ -68,6 +68,16 @@ Return 1 Return 0 Return 0 +Dump String::Repeat +Return "" +Return "........" +Return "" +Dump String::SuperPad +Return "" +Return "a......." +Return "abc....." +Return ".......a" +Return ".....abc" Dump String::Pad Return " " Return " " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.19/library/types/testsuite/tests/String.ycp new/yast2-2.23.21/library/types/testsuite/tests/String.ycp --- old/yast2-2.23.19/library/types/testsuite/tests/String.ycp 2013-01-15 14:46:24.000000000 +0100 +++ new/yast2-2.23.21/library/types/testsuite/tests/String.ycp 2013-02-22 10:46:36.000000000 +0100 @@ -102,6 +102,18 @@ TEST(``(String::CutZeros("0")), [], nil); TEST(``(String::CutZeros("00")), [], nil); +DUMP("String::Repeat"); +TEST(``(mergestring(["\"", String::Repeat(nil, 2),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::Repeat(".", 8),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::Repeat(".", -1),"\""],"")), [], nil); + +DUMP("String::SuperPad"); +TEST(``(mergestring(["\"", String::SuperPad(nil, 2, nil, `left),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::SuperPad("a", 8, ".", `left),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::SuperPad("abc", 8, ".", `left),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::SuperPad("a", 8, ".", `right),"\""],"")), [], nil); +TEST(``(mergestring(["\"", String::SuperPad("abc", 8, ".", `right),"\""],"")), [], nil); + DUMP("String::Pad"); TEST(``(mergestring(["\"", String::Pad(nil, 2),"\""],"")), [], nil); TEST(``(mergestring(["\"", String::Pad("", 2),"\""],"")), [], nil); -- 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