Hello community,
here is the log from the commit of package yast2-restore for openSUSE:Factory
checked in at Wed Feb 4 01:02:36 CET 2009.
--------
--- yast2-restore/yast2-restore.changes 2008-12-16 15:46:47.000000000 +0100
+++ yast2-restore/yast2-restore.changes 2009-01-29 19:35:34.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Jan 29 19:21:35 CET 2009 - locilka@suse.cz
+
+- Fixed displaying i18n characters in summary (bnc #460674).
+- Save summary to file - huge speedup (bnc #460674).
+- 2.18.0
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-restore-2.17.0.tar.bz2
New:
----
yast2-restore-2.18.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-restore.spec ++++++
--- /var/tmp/diff_new_pack.QN4866/_old 2009-02-04 01:01:33.000000000 +0100
+++ /var/tmp/diff_new_pack.QN4866/_new 2009-02-04 01:01:33.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package yast2-restore (Version 2.17.0)
+# spec file for package yast2-restore (Version 2.18.0)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,12 +19,12 @@
Name: yast2-restore
-Version: 2.17.0
+Version: 2.18.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-restore-2.17.0.tar.bz2
+Source0: yast2-restore-2.18.0.tar.bz2
Prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
Requires: aaa_base
@@ -47,7 +47,7 @@
Ladislav Slezak
%prep
-%setup -n yast2-restore-2.17.0
+%setup -n yast2-restore-2.18.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -82,6 +82,10 @@
%{prefix}/lib/YaST2/bin/restore_parse_pkginfo.pl
%doc %{prefix}/share/doc/packages/yast2-restore
%changelog
+* Thu Jan 29 2009 locilka@suse.cz
+- Fixed displaying i18n characters in summary (bnc #460674).
+- Save summary to file - huge speedup (bnc #460674).
+- 2.18.0
* Tue Dec 16 2008 locilka@suse.cz
- Fixed alignment of buttons (bnc #447102).
- 2.17.0
++++++ yast2-restore-2.17.0.tar.bz2 -> yast2-restore-2.18.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-restore-2.17.0/configure new/yast2-restore-2.18.0/configure
--- old/yast2-restore-2.17.0/configure 2008-12-16 15:30:03.000000000 +0100
+++ new/yast2-restore-2.18.0/configure 2009-01-30 16:19:39.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-restore 2.16.2.
+# Generated by GNU Autoconf 2.63 for yast2-restore 2.18.0.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-restore'
PACKAGE_TARNAME='yast2-restore'
-PACKAGE_VERSION='2.16.2'
-PACKAGE_STRING='yast2-restore 2.16.2'
+PACKAGE_VERSION='2.18.0'
+PACKAGE_STRING='yast2-restore 2.18.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,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-restore 2.16.2 to adapt to many kinds of systems.
+\`configure' configures yast2-restore 2.18.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-restore 2.16.2:";;
+ short | recursive ) echo "Configuration of yast2-restore 2.18.0:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-restore configure 2.16.2
+yast2-restore configure 2.18.0
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,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-restore $as_me 2.16.2, which was
+It was created by yast2-restore $as_me 2.18.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-restore'
- VERSION='2.16.2'
+ VERSION='2.18.0'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.16.2"
+VERSION="2.18.0"
RPMNAME="yast2-restore"
MAINTAINER="Lukas Ocilka "
@@ -3451,7 +3451,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-restore $as_me 2.16.2, which was
+This file was extended by yast2-restore $as_me 2.18.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-restore config.status 2.16.2
+yast2-restore config.status 2.18.0
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-restore-2.17.0/configure.in new/yast2-restore-2.18.0/configure.in
--- old/yast2-restore-2.17.0/configure.in 2008-12-16 15:29:58.000000000 +0100
+++ new/yast2-restore-2.18.0/configure.in 2009-01-30 16:19:36.000000000 +0100
@@ -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-restore, 2.16.2, http://bugs.opensuse.org/, yast2-restore)
+AC_INIT(yast2-restore, 2.18.0, http://bugs.opensuse.org/, yast2-restore)
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.2"
+VERSION="2.18.0"
RPMNAME="yast2-restore"
MAINTAINER="Lukas Ocilka "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-restore-2.17.0/src/Restore.ycp new/yast2-restore-2.18.0/src/Restore.ycp
--- old/yast2-restore-2.17.0/src/Restore.ycp 2008-12-15 14:12:41.000000000 +0100
+++ new/yast2-restore-2.18.0/src/Restore.ycp 2009-01-29 19:36:11.000000000 +0100
@@ -11,7 +11,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: Restore.ycp 41703 2007-11-01 13:56:53Z locilka $
+ * $Id: Restore.ycp 55155 2009-01-29 18:36:15Z locilka $
* Representation of the configuration of restore.
* Input and output routines.
@@ -972,7 +972,7 @@
infofiles = infofiles + (compressed_packages_info ? "info/packages_info.gz" : "info/packages_info");
// unpack info files
- result = (map) SCR::Execute(.target.bash_output, "/bin/tar -C " + tempdir + " -x -f " + filename + " " + infofiles + " 2> /dev/null");
+ result = (map) SCR::Execute(.target.bash_output, "/bin/tar -C '" + String::Quote (tempdir) + "' -x -f " + filename + " " + infofiles + " 2> /dev/null");
date = (string) SCR::Read(.target.string, tempdir + "/info/date");
comment = (string) SCR::Read(.target.string, tempdir + "/info/comment");
@@ -1460,6 +1460,10 @@
}
);
+ // BNC #460674, Do not change the system locale
+ // It can change I18N characters in output
+ string locale_modifications = "export LANG=C; ";
+
if (fileinarchive == "")
{
y2error("Can't find subarchive for package %1", package);
@@ -1478,14 +1482,14 @@
}
);
- string command = "export LC_ALL=C; echo q | /bin/tar -C " + tempdir + " -x -M " + param + fileinarchive + " 2> /dev/null";
+ string command = locale_modifications + "echo q | /bin/tar -C " + tempdir + " -x -M " + param + fileinarchive + " 2> /dev/null";
y2debug("Running command: %1", command);
started = (boolean) SCR::Execute(.background.run, command);
}
else
{
- started = (boolean) SCR::Execute(.background.run, "export LC_ALL=C; /bin/tar -C " + tempdir + " -x -f " + filename + " " + fileinarchive);
+ started = (boolean) SCR::Execute(.background.run, locale_modifications + "/bin/tar -C " + tempdir + " -x -f " + filename + " " + fileinarchive);
}
// abort test cycle
@@ -1563,11 +1567,11 @@
// for tar: --files-from=filename
// create (s)tar command
- string tarcommand = (star == false) ? ("export LC_ALL=C; /bin/tar -C " + targetdir + " "
+ string tarcommand = (star == false) ? (locale_modifications + "/bin/tar -C " + targetdir + " "
+ compress + " -x -v -f " + tempdir + "/" + fileinarchive + " " + RPMdb
+ " " + unpackfiles + " 2> " + tempdir + "/tar.stderr > " + tempdir
+ "/tar.stdout")
- : ("export LC_ALL=C; /usr/bin/star -C " + targetdir + " "
+ : (locale_modifications + "/usr/bin/star -C " + targetdir + " "
+ compress + " -x -v -U -f " + tempdir + "/" + fileinarchive + " " + RPMdb
+ " " + unpackfiles + " 2> " + tempdir + "/tar.stderr > " + tempdir
+ "/tar.stdout");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-restore-2.17.0/src/summary_dialog.ycp new/yast2-restore-2.18.0/src/summary_dialog.ycp
--- old/yast2-restore-2.17.0/src/summary_dialog.ycp 2008-12-15 14:12:41.000000000 +0100
+++ new/yast2-restore-2.18.0/src/summary_dialog.ycp 2009-01-30 15:23:25.000000000 +0100
@@ -11,7 +11,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: summary_dialog.ycp 24002 2005-07-12 10:10:31Z locilka $
+ * $Id: summary_dialog.ycp 55169 2009-01-30 14:23:28Z locilka $
*
* Display summary dialog in wizard with optional details. Summary can be saved to file.
*
@@ -25,6 +25,8 @@
import "Popup";
import "Label";
+import "Directory";
+import "String";
/**
* This function removes HTML tags from input string
@@ -32,8 +34,7 @@
* @return string String without tags
*/
-define string RemoveTags(string input) ``{
- string ret = input;
+define string RemoveTags(string & ret) ``{
map tagmapping = $[ "BR" : "\n", "/P" : "\n", "P" : "", "B" : "", "/B" : "",
"EM" : "", "/EM" : "", "I" : "", "/I" : "", "TT" : "", "/TT" : "",
@@ -42,17 +43,22 @@
"H3" : "", "/H3" : ""
];
+ string tag = nil;
+ string taglower = nil;
+
foreach(string t, string repl, tagmapping, ``{
- string tag = "<" + t + ">";
+ tag = "<" + t + ">";
while (issubstring(ret, tag))
{
ret = regexpsub(ret, "(.*)" + tag + "(.*)", "\\1" + repl + "\\2");
}
- while (issubstring(ret, tolower(tag)))
+ taglower = tolower(tag);
+
+ while (issubstring(ret, taglower))
{
- ret = regexpsub(ret, "(.*)" + tag + "(.*)", "\\1" + repl + "\\2");
+ ret = regexpsub(ret, "(.*)" + taglower + "(.*)", "\\1" + repl + "\\2");
}
}
);
@@ -120,7 +126,35 @@
if (savefile != "" && savefile != nil)
{
- SCR::Write(.target.string, savefile, RemoveTags(detail_text));
+ // Create or empty the file
+ SCR::Write(.target.string, savefile, "");
+
+ // BNC #460674
+ // Due to the very ineffective all-in-one-run function, removing HTML
+ // and writing thw whole file at once takes just too much time
+ //
+ // Fixed by going through the summary line by line (by <BR>s)
+
+ string tmpfile = Directory::tmpdir + "/restore_tmpfile";
+
+ y2milestone ("Using tmpfile: %1", tmpfile);
+ // Using tmpfile - there are more powerful tools for parsing text
+ if (SCR::Write (.target.string, tmpfile, detail_text)) {
+ if ((integer) SCR::Execute (
+ .target.bash,
+ sformat ("perl -pi -e \"s/<BR>/\\n\/g;\" '%1'", String::Quote (tmpfile))
+ ) == 0) {
+ detail_text = (string) SCR::Read (.target.string, tmpfile);
+ }
+ }
+
+ foreach (string one_line, splitstring (detail_text, "\n"), {
+ // <BR> == newline
+ one_line = one_line + "\n";
+ // Appending lines one by one
+ SCR::Write (.backup.file_append, [savefile, RemoveTags (one_line)]);
+ });
+
y2milestone("Summary saved to file: %1", savefile);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-restore-2.17.0/src/ui.ycp new/yast2-restore-2.18.0/src/ui.ycp
--- old/yast2-restore-2.17.0/src/ui.ycp 2008-12-16 15:47:41.000000000 +0100
+++ new/yast2-restore-2.18.0/src/ui.ycp 2008-12-16 15:47:32.000000000 +0100
@@ -11,7 +11,7 @@
* Authors:
* Ladislav Slezak
*
- * $Id: ui.ycp 54187 2008-12-16 14:47:41Z locilka $
+ * $Id: ui.ycp 54186 2008-12-16 14:47:33Z locilka $
*
* All user interface functions.
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-restore-2.17.0/VERSION new/yast2-restore-2.18.0/VERSION
--- old/yast2-restore-2.17.0/VERSION 2008-12-16 15:42:34.000000000 +0100
+++ new/yast2-restore-2.18.0/VERSION 2009-01-29 19:36:04.000000000 +0100
@@ -1 +1 @@
-2.17.0
+2.18.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org