Hello community,
here is the log from the commit of package yast2-ncurses
checked in at Wed May 17 19:05:10 CEST 2006.
--------
--- yast2-ncurses/yast2-ncurses.changes 2006-05-10 14:25:56.000000000 +0200
+++ yast2-ncurses/yast2-ncurses.changes 2006-05-17 17:58:39.000000000 +0200
@@ -1,0 +2,9 @@
+Wed May 17 17:51:48 CEST 2006 - gs@suse.de
+
+- Package Installation/Online Update: Install correct package if the user
+ requests a certain package version, i.e. changing the "candidate".
+ Add view 'Versions' to Online Update 'Information' menu.
+ (bug #164487)
+- 2.13.31
+
+-------------------------------------------------------------------
Old:
----
yast2-ncurses-2.13.30.tar.bz2
New:
----
yast2-ncurses-2.13.31.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ncurses.spec ++++++
--- /var/tmp/diff_new_pack.kgt6wm/_old 2006-05-17 19:04:58.000000000 +0200
+++ /var/tmp/diff_new_pack.kgt6wm/_new 2006-05-17 19:04:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ncurses (Version 2.13.30)
+# spec file for package yast2-ncurses (Version 2.13.31)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-ncurses
-Version: 2.13.30
-Release: 2
+Version: 2.13.31
+Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ncurses-2.13.30.tar.bz2
+Source0: yast2-ncurses-2.13.31.tar.bz2
prefix: /usr
BuildRequires: doxygen gcc-c++ libzypp-devel yast2-core-devel yast2-devtools
BuildRequires: blocxx-devel libxcrypt-devel
@@ -40,7 +40,7 @@
%prep
-%setup -n yast2-ncurses-2.13.30
+%setup -n yast2-ncurses-2.13.31
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,6 +73,12 @@
%doc %{prefix}/share/doc/packages/yast2-ncurses
%changelog -n yast2-ncurses
+* Wed May 17 2006 - gs@suse.de
+- Package Installation/Online Update: Install correct package if the user
+ requests a certain package version, i.e. changing the "candidate".
+ Add view 'Versions' to Online Update 'Information' menu.
+ (bug #164487)
+- 2.13.31
* Wed May 10 2006 - gs@suse.de
- Package Installation dialag: Create appropriate 'Filter' menu
with 'Patterns' or 'Selections' (bug #171024, bug #173885)
++++++ yast2-ncurses-2.13.30.tar.bz2 -> yast2-ncurses-2.13.31.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/Makefile.am new/yast2-ncurses-2.13.31/Makefile.am
--- old/yast2-ncurses-2.13.30/Makefile.am 2006-05-09 09:34:45.000000000 +0200
+++ new/yast2-ncurses-2.13.31/Makefile.am 2006-05-16 22:44:11.000000000 +0200
@@ -8,6 +8,7 @@
#where devtools are
PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools)
+Y2TOOL = $(PREFIX)/bin/y2tool
VERSION = $(shell cat $(srcdir)/VERSION)
RPMNAME = $(shell cat $(srcdir)/RPMNAME)
@@ -95,7 +96,7 @@
done
pot:
- y2tool y2makepot -s $(srcdir)
+ $(Y2TOOL) y2makepot -s $(srcdir)
install-pot: pot
@POT_DST=`find -type d -name testsuite -prune , \
@@ -116,7 +117,7 @@
fi
spellcheck: pot
- y2tool pot-spellcheck
+ $(Y2TOOL) pot-spellcheck
# all-local: $(if $(IS_DEVTOOLS),,$(POT_DST))
@@ -143,20 +144,20 @@
rm -f package/*.bak
rm -f package/*.auto
mv $(RPMNAME)-$(VERSION).tar.bz2 package/
- if ! test -x $(PREFIX)/bin/y2tool; then \
- echo "$(PREFIX)/bin/y2tool: not found."; \
+ if ! test -x $(Y2TOOL); then \
+ echo "$(Y2TOOL): not found."; \
echo "You have to install yast2-devtools to making a package"; \
false; \
fi
here=`pwd`; \
cd $(srcdir) && for i in $(RPMNAME)*.spec.in; do \
newname="`echo "$$i" | sed "s/\.in$$//g"`"; \
- $(PREFIX)/bin/y2tool create-spec < $$i > $$here/package/$${newname} ; \
+ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \
done
package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local
-TAGVERSION = $(PREFIX)/bin/y2tool tagversion
+TAGVERSION = $(Y2TOOL) tagversion
check-up-to-date check-cvs-up-to-date check-svn-up-to-date:
if [ -d $(srcdir)/CVS ]; then \
@@ -200,12 +201,12 @@
fi
check-textdomain:
- $(PREFIX)/bin/y2tool check-textdomain $(srcdir)
+ $(Y2TOOL) check-textdomain $(srcdir)
stable: checkin-stable
checkin-stable: package
- $(PREFIX)/bin/y2tool checkin-stable
+ $(Y2TOOL) checkin-stable
# For po/ modules
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/Makefile.in new/yast2-ncurses-2.13.31/Makefile.in
--- old/yast2-ncurses-2.13.30/Makefile.in 2006-05-09 09:35:22.000000000 +0200
+++ new/yast2-ncurses-2.13.31/Makefile.in 2006-05-16 22:44:33.000000000 +0200
@@ -237,6 +237,7 @@
#where devtools are
PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools)
+Y2TOOL = $(PREFIX)/bin/y2tool
SUBDIRS_FILE = $(shell test -e $(srcdir)/SUBDIRS && echo SUBDIRS)
ACINCLUDE_FILE = $(shell test -e $(srcdir)/acinclude.m4 && echo acinclude.m4)
HAS_YAST_LICENSE = $(shell test -e $(srcdir)/YAST_LICENSE && echo YAST_LICENSE)
@@ -266,7 +267,7 @@
$(IS_DEVTOOLS),Makefile.am.common,$(POT_DST)) $(am__append_1)
@CREATE_PKGCONFIG_NOARCH_TRUE@@CREATE_PKGCONFIG_TRUE@pkgconfigdata_DATA = $(RPMNAME).pc
@CREATE_PKGCONFIG_NOARCH_FALSE@@CREATE_PKGCONFIG_TRUE@pkgconfig_DATA = $(RPMNAME).pc
-TAGVERSION = $(PREFIX)/bin/y2tool tagversion
+TAGVERSION = $(Y2TOOL) tagversion
# test ! -d $(srcdir)/po \
# || { $(MAKE) -C po checkpo && $(MAKE) -C po make-pox; }
# Contents of ./SUBDIRS
@@ -792,7 +793,7 @@
done
pot:
- y2tool y2makepot -s $(srcdir)
+ $(Y2TOOL) y2makepot -s $(srcdir)
install-pot: pot
@POT_DST=`find -type d -name testsuite -prune , \
@@ -813,7 +814,7 @@
fi
spellcheck: pot
- y2tool pot-spellcheck
+ $(Y2TOOL) pot-spellcheck
# all-local: $(if $(IS_DEVTOOLS),,$(POT_DST))
@@ -840,15 +841,15 @@
rm -f package/*.bak
rm -f package/*.auto
mv $(RPMNAME)-$(VERSION).tar.bz2 package/
- if ! test -x $(PREFIX)/bin/y2tool; then \
- echo "$(PREFIX)/bin/y2tool: not found."; \
+ if ! test -x $(Y2TOOL); then \
+ echo "$(Y2TOOL): not found."; \
echo "You have to install yast2-devtools to making a package"; \
false; \
fi
here=`pwd`; \
cd $(srcdir) && for i in $(RPMNAME)*.spec.in; do \
newname="`echo "$$i" | sed "s/\.in$$//g"`"; \
- $(PREFIX)/bin/y2tool create-spec < $$i > $$here/package/$${newname} ; \
+ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \
done
package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local
@@ -895,12 +896,12 @@
fi
check-textdomain:
- $(PREFIX)/bin/y2tool check-textdomain $(srcdir)
+ $(Y2TOOL) check-textdomain $(srcdir)
stable: checkin-stable
checkin-stable: package
- $(PREFIX)/bin/y2tool checkin-stable
+ $(Y2TOOL) checkin-stable
# For po/ modules
checkpo:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/VERSION new/yast2-ncurses-2.13.31/VERSION
--- old/yast2-ncurses-2.13.30/VERSION 2006-05-10 14:26:11.000000000 +0200
+++ new/yast2-ncurses-2.13.31/VERSION 2006-05-17 17:51:35.000000000 +0200
@@ -1 +1 @@
-2.13.30
+2.13.31
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/configure new/yast2-ncurses-2.13.31/configure
--- old/yast2-ncurses-2.13.30/configure 2006-05-09 09:35:11.000000000 +0200
+++ new/yast2-ncurses-2.13.31/configure 2006-05-16 22:44:25.000000000 +0200
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for yast2-ncurses 2.13.28.
+# Generated by GNU Autoconf 2.59 for yast2-ncurses 2.13.30.
#
-# Report bugs to http://www.suse.de/feedback.
+# Report bugs to http://bugs.opensuse.org/.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -423,9 +423,9 @@
# Identity of this package.
PACKAGE_NAME='yast2-ncurses'
PACKAGE_TARNAME='yast2-ncurses'
-PACKAGE_VERSION='2.13.28'
-PACKAGE_STRING='yast2-ncurses 2.13.28'
-PACKAGE_BUGREPORT='http://www.suse.de/feedback'
+PACKAGE_VERSION='2.13.30'
+PACKAGE_STRING='yast2-ncurses 2.13.30'
+PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
ac_default_prefix=/usr
@@ -971,7 +971,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 2.13.28 to adapt to many kinds of systems.
+\`configure' configures yast2-ncurses 2.13.30 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1038,7 +1038,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-ncurses 2.13.28:";;
+ short | recursive ) echo "Configuration of yast2-ncurses 2.13.30:";;
esac
cat <<\_ACEOF
@@ -1088,7 +1088,7 @@
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to http://www.suse.de/feedback.
+Report bugs to http://bugs.opensuse.org/.
_ACEOF
fi
@@ -1184,7 +1184,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2-ncurses configure 2.13.28
+yast2-ncurses configure 2.13.30
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1198,7 +1198,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 $as_me 2.13.28, which was
+It was created by yast2-ncurses $as_me 2.13.30, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1928,7 +1928,7 @@
# Define the identity of the package.
PACKAGE='yast2-ncurses'
- VERSION='2.13.28'
+ VERSION='2.13.30'
cat >>confdefs.h <<_ACEOF
@@ -2139,7 +2139,7 @@
-VERSION="2.13.28"
+VERSION="2.13.30"
RPMNAME="yast2-ncurses"
MAINTAINER="Martin Lazar "
@@ -5416,9 +5416,9 @@
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to http://www.suse.de/feedback ##
-## ------------------------------------------ ##
+## ---------------------------------------- ##
+## Report this to http://bugs.opensuse.org/ ##
+## ---------------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -20160,7 +20160,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-ncurses $as_me 2.13.28, which was
+This file was extended by yast2-ncurses $as_me 2.13.30, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20223,7 +20223,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-ncurses config.status 2.13.28
+yast2-ncurses config.status 2.13.30
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/configure.in new/yast2-ncurses-2.13.31/configure.in
--- old/yast2-ncurses-2.13.30/configure.in 2006-05-09 09:34:45.000000000 +0200
+++ new/yast2-ncurses-2.13.31/configure.in 2006-05-16 22:44:11.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-ncurses
dnl
-dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-ncurses, 2.13.28, http://www.suse.de/feedback, yast2-ncurses)
+AC_INIT(yast2-ncurses, 2.13.30, http://bugs.opensuse.org/, yast2-ncurses)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.28"
+VERSION="2.13.30"
RPMNAME="yast2-ncurses"
MAINTAINER="Martin Lazar "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/packages.pot new/yast2-ncurses-2.13.31/packages.pot
--- old/yast2-ncurses-2.13.30/packages.pot 2006-05-10 13:06:06.000000000 +0200
+++ new/yast2-ncurses-2.13.31/packages.pot 2006-05-10 14:41:51.000000000 +0200
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-05-10 13:06+0200\n"
+"POT-Creation-Date: 2006-05-10 14:41+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/NCPkgTable.cc new/yast2-ncurses-2.13.31/src/NCPkgTable.cc
--- old/yast2-ncurses-2.13.30/src/NCPkgTable.cc 2006-05-10 12:16:24.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/NCPkgTable.cc 2006-05-16 18:58:02.000000000 +0200
@@ -438,13 +438,25 @@
ZyppStatus newstatus = S_NoInst;
if ( slbPtr && objPtr)
{
- // get the new status - use particular strategy
- newstatus = statusStrategy->getPackageStatus( slbPtr, objPtr );
- }
- // set new status (if status has changed)
- if ( getStatus(index) != newstatus )
- {
- cc->setStatus( newstatus );
+ if ( tableType == T_Availables )
+ {
+ string isCandidate = " ";
+ if ( objPtr == slbPtr->candidateObj() )
+ isCandidate = " x ";
+
+ cl->AddCol( 2, new NCTableCol( isCandidate ) );
+ }
+ else
+ {
+ // get the new status and replace old status
+ newstatus = statusStrategy->getPackageStatus( slbPtr, objPtr );
+
+ // set new status (if status has changed)
+ if ( getStatus(index) != newstatus )
+ {
+ cc->setStatus( newstatus );
+ }
+ }
}
index++;
}
@@ -456,17 +468,6 @@
///////////////////////////////////////////////////////////////////
//
-// get status of a certain package in list of available packages
-//
-ZyppStatus NCPkgTable::getAvailableStatus ( const ZyppSel & slbPtr,
- const ZyppObj & objPtr )
-{
- return ( statusStrategy->getPackageStatus( slbPtr, objPtr) );
-};
-
-
-///////////////////////////////////////////////////////////////////
-//
// fillDefaultList
//
// Fills the package table with the list of default rpm group
@@ -600,6 +601,7 @@
header.reserve(6);
header.push_back( "L" + PkgNames::PkgStatus() );
header.push_back( "L" + PkgNames::PkgName() );
+ header.push_back( "L" + PkgNames::PkgStatus() );
header.push_back( "L" + PkgNames::PkgVersion() );
header.push_back( "L" + PkgNames::PkgInstSource() );
header.push_back( "L" + PkgNames::PkgSize() );
@@ -625,7 +627,7 @@
bool NCPkgTable::createListEntry ( ZyppPkg pkgPtr, ZyppSel slbPtr )
{
vector<string> pkgLine;
- pkgLine.reserve(5);
+ pkgLine.reserve(6);
if ( !pkgPtr || !slbPtr )
{
@@ -668,12 +670,26 @@
break;
}
case T_Availables: {
+ string isCandidate = " ";
+ if ( pkgPtr == slbPtr->candidateObj() )
+ isCandidate = " x ";
+ pkgLine.push_back( isCandidate );
+
version = pkgPtr->edition().asString();
pkgLine.push_back( version );
// is alias the right string? id?
pkgLine.push_back( pkgPtr->source().alias() ); // show the installation source
- status = getAvailableStatus( slbPtr, pkgPtr ); // the status of this certain package
+ // set package status either to S_NoInst or S_KeepInstalled
+ status = S_NoInst;
+ if ( slbPtr->hasInstalledObj() )
+ {
+ if ( pkgPtr->edition() == slbPtr->installedObj()->edition() &&
+ pkgPtr->arch() == slbPtr->installedObj()->arch() )
+ {
+ status = S_KeepInstalled;
+ }
+ }
zypp::ByteCount size = pkgPtr->size(); // installed size
pkgLine.push_back( size.asString( 8 ) ); // format size
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/NCPkgTable.h new/yast2-ncurses-2.13.31/src/NCPkgTable.h
--- old/yast2-ncurses-2.13.30/src/NCPkgTable.h 2006-05-10 12:12:34.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/NCPkgTable.h 2006-05-16 11:08:53.000000000 +0200
@@ -228,14 +228,6 @@
*/
ZyppStatus getStatus( int index );
- /**
- * Gets the package status of an available package.
- * @param objPtr The certain package
- * @return ZyppStatus
- */
- ZyppStatus getAvailableStatus( const ZyppSel & slbPtr,
- const ZyppObj & objPtr );
-
#ifdef FIXME
/**
* Toggles the installation of the source package.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/ObjectStatStrategy.cc new/yast2-ncurses-2.13.31/src/ObjectStatStrategy.cc
--- old/yast2-ncurses-2.13.30/src/ObjectStatStrategy.cc 2006-04-25 14:12:58.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/ObjectStatStrategy.cc 2006-05-17 17:30:52.000000000 +0200
@@ -546,87 +546,57 @@
return false;
}
-#ifdef OLD_CODE
-// ok = slbPtr->set_status( newstatus );
- ok = slbPtr->set_status( S_Update ); // FIXME only works for installed
- if ( ok )
- {
- // this package is the candidate now
- bool ret = slbPtr->setCandidate( objPtr );
- // the new candidate can have a different one
- slbPtr->setLicenceConfirmed (false);
- NCMIL << "Set user candidate returns: " << (ret?"true":"false") << endl;
- }
-#endif
-
- // this package is the candidate now
- ok = slbPtr->setCandidate( objPtr );
- NCMIL << "Set user candidate returns: " << (ok?"true":"false") << endl;
+ ZyppObj newCandidate = objPtr;
- if ( ok )
+ if ( newCandidate != slbPtr->candidateObj() )
{
- // set new package status
- ok = slbPtr->set_status( newstatus );
+ NCMIL << "CANDIDATE changed" << endl;
- // the new candidate can have a different one
- slbPtr->setLicenceConfirmed (false);
- }
-
- NCMIL << "Set status of: " << slbPtr->name() << " to: "
- << newstatus << " returns: " << (ok?"true":"false") << endl;
-
- return ok;
-}
+ // Change status of selectable
+ ZyppStatus status = slbPtr->status();
+ if ( slbPtr->installedObj() &&
+ slbPtr->installedObj()->edition() == newCandidate->edition() )
+ {
+ // Switch back to the original instance -
+ // the version that was previously installed
+ status = S_KeepInstalled;
+ }
+ else
+ {
+ switch ( status )
+ {
+ case S_KeepInstalled:
+ case S_Protected:
+ case S_AutoDel:
+ case S_AutoUpdate:
+ case S_Del:
+ case S_Update:
+
+ status = S_Update;
+ break;
+
+ case S_NoInst:
+ case S_Taboo:
+ case S_Install:
+ case S_AutoInstall:
+ status = S_Install;
+ break;
+ }
+ }
+
+ // Set status
+ ok = slbPtr->set_status( status );
+ NCMIL << "Set status of: " << slbPtr->name() << " to: "
+ << status << " returns: " << (ok?"true":"false") << endl;
+
+ // Set candidate
+ ok = slbPtr->setCandidate( newCandidate );
+ NCMIL << "Set user candidate returns: " << (ok?"true":"false") << endl;
-///////////////////////////////////////////////////////////////////
-//
-// AvailableStatStrategy::getStatus
-//
-// Returns the status of the certain package
-//
-ZyppStatus AvailableStatStrategy::getPackageStatus( ZyppSel slbPtr,
- ZyppObj objPtr )
-{
- ZyppStatus retStatus = S_NoInst;
-
- if ( !slbPtr || ! objPtr )
- {
- return retStatus;
}
-#ifdef OLD_CODE
- // ZyppStatus status = slbPtr->status();
-
- if (objPtr == slbPtr->candidateObj())
- retStatus = S_KeepInstalled;
- else if (slbPtr->hasInstalledObj() &&
- slbPtr->installedObj()->edition() == objPtr->edition() )
- retStatus = S_Del;
-#endif
-
- ZyppStatus status = slbPtr->status();
- NCDBG << "STATUS of " << slbPtr->name() << ": " << slbPtr->status() << endl;
-
- if (slbPtr->hasInstalledObj() &&
- slbPtr->installedObj()->edition() == objPtr->edition() &&
- slbPtr->installedObj()->arch() == objPtr->arch() )
- {
- // installed package: show status S_KeepInstalled or S_Delete
- if ( status == S_KeepInstalled
- || status == S_Del )
- retStatus = status;
-
- }
- else if ( objPtr == slbPtr->candidateObj() )
- {
- if ( status != S_KeepInstalled
- && status != S_Del )
- retStatus = status;
- }
- // else show S_NoInst
-
- return retStatus;
+ return ok;
}
//------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/ObjectStatStrategy.h new/yast2-ncurses-2.13.31/src/ObjectStatStrategy.h
--- old/yast2-ncurses-2.13.30/src/ObjectStatStrategy.h 2006-04-10 09:59:25.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/ObjectStatStrategy.h 2006-05-16 11:11:57.000000000 +0200
@@ -228,15 +228,6 @@
virtual ~AvailableStatStrategy() {}
/**
- * Gets the status information from the package manager - and
- * returns the status for a certain package.
- * @param slbPtr The package whose status to calculate.
- * @return UI_Status The new status of the given package
- *
- **/
- virtual ZyppStatus getPackageStatus ( ZyppSel slbPtr, ZyppObj objPtr );
-
- /**
* Informs the package manager about the new status and
* additionally sets the candidate object to the user chosen object.
* @param newStatus The new package status
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/PackageSelector.cc new/yast2-ncurses-2.13.31/src/PackageSelector.cc
--- old/yast2-ncurses-2.13.30/src/PackageSelector.cc 2006-05-10 14:00:50.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/PackageSelector.cc 2006-05-17 17:29:23.000000000 +0200
@@ -134,7 +134,8 @@
// YOU information
eventHandlerMap[ PkgNames::PatchDescr()->toString() ] = &PackageSelector::InformationHandler;
eventHandlerMap[ PkgNames::PatchPackages()->toString() ] = &PackageSelector::InformationHandler;
-
+ eventHandlerMap[ PkgNames::PatchPackagesVersions()->toString() ] = &PackageSelector::InformationHandler;
+
// Action menu
eventHandlerMap[ PkgNames::Toggle()->toString() ] = &PackageSelector::StatusHandler;
eventHandlerMap[ PkgNames::Select()->toString() ] = &PackageSelector::StatusHandler;
@@ -317,8 +318,8 @@
if ( patterns && !selections )
{
// ReplaceWidget and show menu entry Patterns instead of Selections
- char menu[1200];
- sprintf ( menu,
+ char menu[4000];
+ snprintf ( menu, sizeof(menu) - 1,
"`MenuButton( `opt(`key_F4), \"%s\", "
"[`item( `id(\"groups\"), \"%s\" ), `item( `id(\"patterns\"), \"%s\" ), "
" `item( `id(\"search\"), \"%s\" ), `item( `id(\"installed\"), \"%s\" ), "
@@ -337,15 +338,15 @@
YCPValue layout = YCPNull ();
if (parsed_code != NULL)
layout = parsed_code->evaluate();
-
- y2ui->evaluateReplaceWidget( YCPSymbol("replacefilter"), layout->asTerm() );
+ if ( !layout.isNull() )
+ y2ui->evaluateReplaceWidget( YCPSymbol("replacefilter"), layout->asTerm() );
}
else if ( patterns && selections )
{
// ReplaceWidget and show menu entries Patterns AND Selections
- char menu[1200];
- sprintf ( menu,
+ char menu[4000];
+ snprintf ( menu, sizeof(menu) - 1,
"`MenuButton(`opt(`key_F4), \"%s\", "
"[`item( `id(\"groups\"), \"%s\" ), `item( `id(\"patterns\"), \"%s\" ), "
" `item( `id(\"selections\"), \"%s\" ), "
@@ -366,8 +367,8 @@
YCPValue layout = YCPNull ();
if (parsed_code != NULL)
layout = parsed_code->evaluate();
-
- y2ui->evaluateReplaceWidget( YCPSymbol("replacefilter"), layout->asTerm() );
+ if ( !layout.isNull() )
+ y2ui->evaluateReplaceWidget( YCPSymbol("replacefilter"), layout->asTerm() );
}
}
@@ -847,7 +848,7 @@
// fillPatchPackages
//
//
-bool PackageSelector::fillPatchPackages ( NCPkgTable * pkgTable, ZyppObj objPtr )
+bool PackageSelector::fillPatchPackages ( NCPkgTable * pkgTable, ZyppObj objPtr, bool versions )
{
if ( !pkgTable )
return false;
@@ -888,7 +889,23 @@
else
{
patchSelectables.insert( sel );
- pkgTable->createListEntry( pkg, sel );
+
+ if ( versions )
+ {
+ // show all availables
+ zypp::ui::Selectable::available_iterator
+ b = sel->availableBegin (),
+ e = sel->availableEnd (),
+ it;
+ for (it = b; it != e; ++it)
+ {
+ pkgTable->createListEntry( tryCastToZyppPkg (*it), sel );
+ }
+ }
+ else
+ {
+ pkgTable->createListEntry( pkg, sel );
+ }
}
}
@@ -1251,8 +1268,8 @@
YCPValue layout = YCPNull ();
if (parsed_code != NULL)
layout = parsed_code->evaluate();
-
- y2ui->evaluateReplaceWidget( YCPSymbol("replaceinfo"), layout->asTerm() );
+ if (!layout.isNull() )
+ y2ui->evaluateReplaceWidget( YCPSymbol("replaceinfo"), layout->asTerm() );
NCPkgTable * pkgAvail = dynamic_cast(y2ui->widgetWithId(PkgNames::AvailPkgs(), true));
@@ -1278,8 +1295,8 @@
YCPValue layout = YCPNull ();
if (parsed_code != NULL)
layout = parsed_code->evaluate();
-
- y2ui->evaluateReplaceWidget( YCPSymbol ("replaceinfo"), layout->asTerm() );
+ if (!layout.isNull())
+ y2ui->evaluateReplaceWidget( YCPSymbol ("replaceinfo"), layout->asTerm() );
NCPkgTable * patchPkgs = dynamic_cast(y2ui->widgetWithId(PkgNames::PatchPkgs(), true));
@@ -1295,6 +1312,32 @@
fillPatchPackages( patchPkgs, packageList->getDataPointer( packageList->getCurrentItem() ) );
}
}
+ else if ( visibleInfo->compare( PkgNames::PatchPackagesVersions() ) == YO_EQUAL )
+ {
+ // show the package table
+ const char * tableLayout = "`PkgSpecial( `id(\"pkgsversions\"), `opt(`notify), \"pkgTable\" )";
+ Parser parser( tableLayout );
+ YCodePtr parsed_code = parser.parse ();
+ YCPValue layout = YCPNull ();
+ if (parsed_code != NULL)
+ layout = parsed_code->evaluate();
+ if (!layout.isNull())
+ y2ui->evaluateReplaceWidget( YCPSymbol ("replaceinfo"), layout->asTerm() );
+
+ NCPkgTable * patchPkgsVersions = dynamic_cast(y2ui->widgetWithId(PkgNames::PatchPkgsVersions(), true));
+
+ if ( patchPkgsVersions )
+ {
+ // set the connection to the PackageSelector !!!!
+ patchPkgsVersions->setPackager( this );
+ // set status strategy
+ ObjectStatStrategy * strategy = new AvailableStatStrategy();
+ patchPkgsVersions->setTableType( NCPkgTable::T_Availables, strategy );
+
+ patchPkgsVersions->fillHeader( );
+ fillPatchPackages( patchPkgsVersions, packageList->getDataPointer( packageList->getCurrentItem() ), true );
+ }
+ }
else
{
// show the rich text widget
@@ -1304,8 +1347,8 @@
YCPValue layout = YCPNull ();
if (parsed_code != NULL)
layout = parsed_code->evaluate ();
-
- y2ui->evaluateReplaceWidget( YCPSymbol ("replaceinfo"), layout->asTerm() );
+ if (!layout.isNull())
+ y2ui->evaluateReplaceWidget( YCPSymbol ("replaceinfo"), layout->asTerm() );
packageList->showInformation( );
}
@@ -1338,11 +1381,11 @@
}
else if ( event.selection->compare( PkgNames::AutoDeps() ) == YO_EQUAL )
{
- char menu[600];
+ char menu[2000];
if ( autoCheck )
{
- sprintf ( menu,
+ snprintf ( menu, sizeof(menu) - 1,
"`MenuButton( \"%s\", ["
"`menu( \"%s\", [`item( `id(\"showdeps\"), \"%s\" ), `item( `id(\"autodeps\"), \"%s\" ) ] )"
#ifdef FIXME
@@ -1378,7 +1421,7 @@
}
else
{
- sprintf ( menu,
+ snprintf ( menu, sizeof(menu) - 1,
"`MenuButton( \"%s\", ["
"`menu( \"%s\", [`item( `id(\"showdeps\"), \"%s\" ), `item( `id(\"autodeps\"), \"%s\" ) ] )"
#ifdef FIXME
@@ -2034,7 +2077,15 @@
fillPatchPackages ( patchPkgList, objPtr);
}
}
-
+ else if ( visibleInfo->compare( PkgNames::PatchPackagesVersions() ) == YO_EQUAL )
+ {
+ NCPkgTable *patchPkgsVersions = dynamic_cast(y2ui->widgetWithId(PkgNames::PatchPkgsVersions(), true));
+ if ( patchPkgsVersions )
+ {
+ fillPatchPackages ( patchPkgsVersions, objPtr, true);
+ }
+ }
+
return true;
}
@@ -2052,6 +2103,7 @@
if ( depsPopup
&& (doit || autoCheck) )
{
+ NCMIL << "Checking dependencies" << endl;
cancel = depsPopup->showDependencies( );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/PackageSelector.h new/yast2-ncurses-2.13.31/src/PackageSelector.h
--- old/yast2-ncurses-2.13.30/src/PackageSelector.h 2006-05-10 11:08:55.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/PackageSelector.h 2006-05-17 12:44:48.000000000 +0200
@@ -162,10 +162,11 @@
/**
* Fills the list of packages belonging to the youPatch
* @param pkgTable The table widget
- * @param youPatch Show all packages belonging to the patch
+ * @param youPatch Show all packages belonging to the patch
+ * @param versions Show all versions of all packages belonging to the patch
* @return bool
*/
- bool fillPatchPackages ( NCPkgTable * pkgTable, ZyppObj youPatch );
+ bool fillPatchPackages ( NCPkgTable * pkgTable, ZyppObj youPatch, bool versions = false );
/**
* Fills the package table with packages matching the search expression
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/PkgNames.cc new/yast2-ncurses-2.13.31/src/PkgNames.cc
--- old/yast2-ncurses-2.13.30/src/PkgNames.cc 2006-05-10 09:53:58.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/PkgNames.cc 2006-05-17 13:00:05.000000000 +0200
@@ -66,6 +66,12 @@
return value;
}
+const YCPValue& PkgNames::PatchPkgsVersions ()
+{
+ static const YCPValue value = createIdValue ( "pkgsversions" );
+ return value;
+}
+
// the description section ( shown on bottom of the selection dialog )
const YCPValue& PkgNames::Description ()
{
@@ -488,6 +494,12 @@
return value;
}
+const YCPValue& PkgNames::PatchPackagesVersions()
+{
+ static const YCPValue value = createIdValue ( "packagesversions" );
+ return value;
+}
+
// id information directory list
const YCPValue& PkgNames::DirList ()
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/PkgNames.h new/yast2-ncurses-2.13.31/src/PkgNames.h
--- old/yast2-ncurses-2.13.30/src/PkgNames.h 2006-05-10 09:53:36.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/PkgNames.h 2006-05-17 12:52:33.000000000 +0200
@@ -49,6 +49,11 @@
static const YCPValue& PatchPkgs ();
/**
+ * Widget id of the list of patch packages verions
+ */
+ static const YCPValue& PatchPkgsVersions ();
+
+ /**
* Widget id of the description section ( shown on bottom of the selection dialog )
*/
static const YCPValue& Description ();
@@ -336,6 +341,11 @@
*/
static const YCPValue& PatchPackages ();
+ /**
+ * Widget id information patch packages versions
+ */
+ static const YCPValue& PatchPackagesVersions ();
+
/**
* Widget id of the directory list
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ncurses-2.13.30/src/you_layout.ycp new/yast2-ncurses-2.13.31/src/you_layout.ycp
--- old/yast2-ncurses-2.13.30/src/you_layout.ycp 2006-05-08 09:30:00.000000000 +0200
+++ new/yast2-ncurses-2.13.31/src/you_layout.ycp 2006-05-17 17:51:22.000000000 +0200
@@ -7,7 +7,7 @@
*
* ncurses layout for YOU
*
- * $Id: you_layout.ycp 30693 2006-05-04 12:23:02Z locilka $
+ * $Id: you_layout.ycp 30983 2006-05-17 15:49:41Z gs $
*/
{
textdomain "packages";
@@ -43,7 +43,8 @@
`Left(`MenuButton( `opt(`key_F6), _( "&Information" ),
// menu items
[`item( `id("patchdescr"), _( "&Long Description" ) ),
- `item( `id("patchpackages"), _( "&Package List" ) )
+ `item( `id("patchpackages"), _( "&Package List" ) ),
+ `item( `id("packagesversions"), _("&Versions") )
]
)),
`HStretch()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...