Hello community,
here is the log from the commit of package yast2-ncurses-pkg for openSUSE:Factory
checked in at Thu Feb 3 22:06:44 CET 2011.
--------
--- yast2-ncurses-pkg/yast2-ncurses-pkg.changes 2011-01-07 16:50:00.000000000 +0100
+++ yast2-ncurses-pkg/yast2-ncurses-pkg.changes 2011-02-03 14:30:02.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Feb 2 14:44:00 CET 2011 - gs@suse.de
+
+- Internal: code cleanup (esp. NCPackageSelector, NCPkgTable),
+ require latest libyui
+- V 2.20.2
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-ncurses-pkg-2.20.1.tar.bz2
New:
----
yast2-ncurses-pkg-2.20.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ncurses-pkg.spec ++++++
--- /var/tmp/diff_new_pack.2rzMi2/_old 2011-02-03 22:05:31.000000000 +0100
+++ /var/tmp/diff_new_pack.2rzMi2/_new 2011-02-03 22:05:31.000000000 +0100
@@ -19,11 +19,11 @@
Name: yast2-ncurses-pkg
-Version: 2.20.1
+Version: 2.20.2
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ncurses-pkg-2.20.1.tar.bz2
+Source0: yast2-ncurses-pkg-2.20.2.tar.bz2
Prefix: /usr
@@ -37,7 +37,7 @@
Provides: yast2_ui_pkg
Requires: glibc-locale
BuildRequires: yast2-core-devel >= 2.16.33
-BuildRequires: yast2-libyui-devel >= 2.19.2
+BuildRequires: yast2-libyui-devel >= 2.20.0
BuildRequires: libzypp-devel >= 7.4.0
Requires: yast2-core >= 2.16.33
#ncurses6 library
@@ -49,7 +49,7 @@
package manager
%prep
-%setup -n yast2-ncurses-pkg-2.20.1
+%setup -n yast2-ncurses-pkg-2.20.2
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-ncurses-pkg-2.20.1.tar.bz2 -> yast2-ncurses-pkg-2.20.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/MAINTAINER new/yast2-ncurses-pkg-2.20.2/MAINTAINER
--- old/yast2-ncurses-pkg-2.20.1/MAINTAINER 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/MAINTAINER 2011-01-25 10:50:45.000000000 +0100
@@ -1 +1 @@
-Katarina Machalkova
+Gabriele Mohr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/VERSION new/yast2-ncurses-pkg-2.20.2/VERSION
--- old/yast2-ncurses-pkg-2.20.1/VERSION 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/VERSION 2011-02-03 13:15:07.000000000 +0100
@@ -1 +1 @@
-2.20.1
+2.20.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/configure new/yast2-ncurses-pkg-2.20.2/configure
--- old/yast2-ncurses-pkg-2.20.1/configure 2011-01-07 16:40:02.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/configure 2011-02-03 14:29:19.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for yast2-ncurses-pkg 2.20.1.
+# Generated by GNU Autoconf 2.65 for yast2-ncurses-pkg 2.20.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -701,8 +701,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-ncurses-pkg'
PACKAGE_TARNAME='yast2-ncurses-pkg'
-PACKAGE_VERSION='2.20.1'
-PACKAGE_STRING='yast2-ncurses-pkg 2.20.1'
+PACKAGE_VERSION='2.20.2'
+PACKAGE_STRING='yast2-ncurses-pkg 2.20.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1481,7 +1481,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-ncurses-pkg 2.20.1 to adapt to many kinds of systems.
+\`configure' configures yast2-ncurses-pkg 2.20.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1553,7 +1553,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-ncurses-pkg 2.20.1:";;
+ short | recursive ) echo "Configuration of yast2-ncurses-pkg 2.20.2:";;
esac
cat <<\_ACEOF
@@ -1667,7 +1667,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-ncurses-pkg configure 2.20.1
+yast2-ncurses-pkg configure 2.20.2
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2159,7 +2159,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-ncurses-pkg $as_me 2.20.1, which was
+It was created by yast2-ncurses-pkg $as_me 2.20.2, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -3082,7 +3082,7 @@
# Define the identity of the package.
PACKAGE='yast2-ncurses-pkg'
- VERSION='2.20.1'
+ VERSION='2.20.2'
cat >>confdefs.h <<_ACEOF
@@ -3204,9 +3204,9 @@
-VERSION="2.20.1"
+VERSION="2.20.2"
RPMNAME="yast2-ncurses-pkg"
-MAINTAINER="Katarina Machalkova "
+MAINTAINER="Gabriele Mohr "
pkgconfigdir=\${libdir}/pkgconfig
pkgconfigdatadir=\${datadir}/pkgconfig
@@ -15973,7 +15973,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-ncurses-pkg $as_me 2.20.1, which was
+This file was extended by yast2-ncurses-pkg $as_me 2.20.2, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16039,7 +16039,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-ncurses-pkg config.status 2.20.1
+yast2-ncurses-pkg config.status 2.20.2
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/configure.in new/yast2-ncurses-pkg-2.20.2/configure.in
--- old/yast2-ncurses-pkg-2.20.1/configure.in 2011-01-07 16:39:54.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/configure.in 2011-02-03 14:29:12.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-ncurses-pkg, 2.20.1, http://bugs.opensuse.org/, yast2-ncurses-pkg)
+AC_INIT(yast2-ncurses-pkg, 2.20.2, http://bugs.opensuse.org/, yast2-ncurses-pkg)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,9 +18,9 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.20.1"
+VERSION="2.20.2"
RPMNAME="yast2-ncurses-pkg"
-MAINTAINER="Katarina Machalkova "
+MAINTAINER="Gabriele Mohr "
dnl pkgconfig honors lib64
pkgconfigdir=\${libdir}/pkgconfig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/src/NCPackageSelector.cc new/yast2-ncurses-pkg-2.20.2/src/NCPackageSelector.cc
--- old/yast2-ncurses-pkg-2.20.1/src/NCPackageSelector.cc 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/src/NCPackageSelector.cc 2011-02-03 13:06:40.000000000 +0100
@@ -373,31 +373,6 @@
packageList->createPatchEntry ( patchPtr, *it);
}
- /*// get the patch list and sort it
- list<ZyppSel> patchList( zyppPatchesBegin (), zyppPatchesEnd () );
- patchList.sort( sortByName );
- list<ZyppSel>::iterator listIt = patchList.begin();
-
- while ( listIt != patchList.end() )
- {
- ZyppPatch patchPtr = tryCastToZyppPatch( ( *listIt)->theObj() );
-
- if ( patchPtr )
- {
- string name = patchPtr->name();
-
- string::iterator pos = search( name.begin(), name.end(),
- expr.begin(), expr.end(),
- ic_compare );
-
- if ( pos != name.end() )
- {
- // search sucessful
- packageList->createPatchEntry( patchPtr, *listIt );
- }
- }
- ++listIt;
- }*/
// show the patch list with search result
packageList->drawList();
@@ -1219,8 +1194,8 @@
if ( ! licenseText.empty() )
{
- yuiMilestone() << "Package/Patch %s has a license agreement"
- << sel->name().c_str() << endl;
+ yuiMilestone() << "Package/Patch " << sel->name().c_str() <<
+ "has a license" << endl;
if( ! sel->hasLicenceConfirmed() )
{
@@ -1228,8 +1203,8 @@
}
else
{
- yuiMilestone() << "Package/Patch %s's license is already confirmed"
- << sel->name().c_str() << endl;
+ yuiMilestone() << "License for " << sel->name().c_str() <<
+ " is already confirmed" << endl;
}
}
}
@@ -1252,16 +1227,7 @@
bool ok = true;
string pkgName = slbPtr->name();
- NCPopupInfo * info = new NCPopupInfo ( wpos( NCurses::lines()/10, NCurses::cols()/10),
- NCPkgStrings::NotifyLabel(),
- "<i>" + pkgName + "</i><br><br>"
- + createDescrText( licenseText ),
- NCPkgStrings::AcceptLabel(),
- NCPkgStrings::CancelLabel() );
-
- info->setPreferredSize( (NCurses::cols() * 80)/100, (NCurses::lines()*80)/100);
- info->focusOkButton();
- license_confirmed = info->showInfoPopup( ) != NCursesEvent::cancel;
+ license_confirmed = showLicensePopup( pkgName, licenseText );
if ( !license_confirmed )
{
@@ -1289,8 +1255,6 @@
ok = true;
}
- YDialog::deleteTopmostDialog();
-
return ok;
}
@@ -1327,83 +1291,41 @@
///////////////////////////////////////////////////////////////////
//
-// createDescrText
-//
-#define DOCTYPETAG "<!-- DT:Rich -->"
+// createLicenseText
+//
+
+#define DOCTYPETAG "<!-- DT:Rich -->" // Special doctype for preformatted HTML
-string NCPackageSelector::createDescrText( string value )
+bool NCPackageSelector::showLicensePopup( string pkgName, string license )
{
string html_text = "";
-
-#ifdef FIXME
- bool author_format = false;
- bool htmlFormat = false; /* Is the description coming in html? */
- /* By default, this is false and the text is plain text. But if the
- * description contains DOCTYPETAG in the first line, it is considered
- * to be formatted in html. The yast (this method here) needs not to
- * do further formatting for the text part.
- */
-
- list<string>::const_iterator it = value.begin();
-
- string line;
-
- /* Check if the first line is the html tag */
- if( it != value.end() )
+ const string htmlIdent(DOCTYPETAG);
+ bool confirmed = false;
+
+ if ( license.find( htmlIdent ) != string::npos )
{
- line = (*it);
- const string htmlIdent(DOCTYPETAG);
-
- if ( line.length() >= htmlIdent.length() && /* Avoid exception if stringlen < len of tag */
- line.substr( 0, htmlIdent.length() ) == htmlIdent ) /* first line == DOCTYPETAG ? */
- {
- htmlFormat = true; /* indicate that the text is already html formatted */
- }
- else
- {
- html_text += line + " ";
- }
- ++it;
+ html_text = license; // HTML text
}
-
- /** Loop over the remaining text. **/
- const string authors("Authors:");
- while ( it != value.end() )
+ else
{
- line = (*it);
+ html_text = "<pre>" + license + "</pre>"; // add <pre> to preserve newlines and spaces
+ }
- /* Check if authors-line starts */
- if ( line.length() >= authors.length() && /* Avoid exception if stringlen < len of Authors */
- line.substr( 0, authors.length() ) == authors )
- {
- line = "<br><b>" + line + "</b>";
- author_format = true;
- }
- if ( author_format )
- {
- /* every author in his own line */
- html_text += line + "<br>";
- }
- else
- {
- html_text += " " + line;
- if( (! htmlFormat) && (line.length() == 0) )
- {
- html_text += "<br>";
- }
- else
- {
- html_text += " ";
- }
- }
+ NCPopupInfo * info = new NCPopupInfo ( wpos( NCurses::lines()/10, NCurses::cols()/10),
+ // headline of a popup showing the package license
+ string( _("End User License Agreement") ),
+ "<i>" + pkgName + "</i><br><br>"
+ + html_text,
+ NCPkgStrings::AcceptLabel(),
+ NCPkgStrings::CancelLabel() );
- ++it;
- }
-#else
- html_text = value;
-#endif
+ info->setPreferredSize( (NCurses::cols() * 80)/100, (NCurses::lines()*80)/100);
+ info->focusOkButton();
+ confirmed = info->showInfoPopup( ) != NCursesEvent::cancel;
+
+ YDialog::deleteTopmostDialog();
- return html_text;
+ return confirmed;
}
///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/src/NCPackageSelector.h new/yast2-ncurses-pkg-2.20.2/src/NCPackageSelector.h
--- old/yast2-ncurses-pkg-2.20.1/src/NCPackageSelector.h 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/src/NCPackageSelector.h 2011-02-03 13:01:15.000000000 +0100
@@ -395,11 +395,12 @@
bool autoChecking() { return autoCheck; }
/**
- * Creates a text from a list of strings which may contain HTML tags
- * @param t used to be list, now a single string. but what does it contain?
- * @return string The text
+ * Shows 'End User License Agreement' popup with license text
+ * @param pkgName the package name
+ * @param license the license text
+ * @return bool license confirmed?
*/
- string createDescrText( string t );
+ bool showLicensePopup( string pkgName, string license );
/**
* Calls the package mananager (updateDu()) and shows the required disk space
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/src/NCPkgPackageDetails.cc new/yast2-ncurses-pkg-2.20.2/src/NCPkgPackageDetails.cc
--- old/yast2-ncurses-pkg-2.20.1/src/NCPkgPackageDetails.cc 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/src/NCPkgPackageDetails.cc 2011-01-20 13:04:21.000000000 +0100
@@ -277,7 +277,7 @@
// get and format the patch description
string value = patchPtr->description();
- //descr += createDescrText( value );
+
descr += "<p>";
descr += value;
descr += "</p>";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/src/NCPkgPopupDescr.cc new/yast2-ncurses-pkg-2.20.2/src/NCPkgPopupDescr.cc
--- old/yast2-ncurses-pkg-2.20.1/src/NCPkgPopupDescr.cc 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/src/NCPkgPopupDescr.cc 2011-01-20 13:24:57.000000000 +0100
@@ -134,7 +134,7 @@
headline->setLabel( pkgPtr->summary() );
- descrText->setText( packager->createDescrText(pkgPtr->description()) );
+ descrText->setText( pkgPtr->description() );
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ncurses-pkg-2.20.1/src/NCPkgTable.cc new/yast2-ncurses-pkg-2.20.2/src/NCPkgTable.cc
--- old/yast2-ncurses-pkg-2.20.1/src/NCPkgTable.cc 2011-01-07 16:29:48.000000000 +0100
+++ new/yast2-ncurses-pkg-2.20.2/src/NCPkgTable.cc 2011-02-03 12:20:38.000000000 +0100
@@ -213,7 +213,7 @@
if ( objPtr )
{
notify = objPtr->delnotify();
- yuiDebug() << "DELETE message: " << notify << endl;
+ yuiMilestone() << "DELETE message: " << notify << endl;
header = NCPkgStrings::WarningLabel();
}
break;
@@ -223,7 +223,7 @@
if ( objPtr )
{
notify = objPtr->insnotify();
- yuiDebug() << "NOTIFY message: " << notify << endl;
+ yuiMilestone() << "NOTIFY message: " << notify << endl;
header = NCPkgStrings::NotifyLabel();
}
case S_Update:
@@ -244,21 +244,9 @@
if ( !license.empty() )
{
- if (!license_confirmed)
+ if ( !license_confirmed )
{
- NCPopupInfo * info = new NCPopupInfo( wpos( (lines * 10)/100, (cols * 10) /100),
- NCPkgStrings::NotifyLabel(),
- string( _("End User License Agreement") +
- "<i>" + pkgName + "</i><br><br>" + packager->createDescrText( license ) ),
- NCPkgStrings::AcceptLabel(),
- NCPkgStrings::CancelLabel()
- );
- info->setPreferredSize( (NCurses::cols() * 80)/100, (NCurses::lines()*80)/100);
- info->focusOkButton();
- license_confirmed = info->showInfoPopup( ) != NCursesEvent::cancel;
-
- YDialog::deleteTopmostDialog();
-
+ license_confirmed = packager->showLicensePopup( pkgName, license);
}
if ( !license_confirmed )
@@ -291,7 +279,7 @@
{
NCPopupInfo * info = new NCPopupInfo( wpos( (lines * 35)/100, (cols * 25)/100),
header,
- "<i>" + pkgName + "</i><br><br>" + packager->createDescrText( notify )
+ "<i>" + pkgName + "</i><br><br>" + notify
);
info->setPreferredSize( (NCurses::cols() * 50)/100, (NCurses::lines() * 30)/100);
info->showInfoPopup( );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org