Author: gs Date: Wed Jun 6 13:18:22 2007 New Revision: 38310 URL: http://svn.opensuse.org/viewcvs/yast?rev=38310&view=rev Log: show correct versions of patch packages Modified: trunk/ncurses/src/NCPkgTable.cc Modified: trunk/ncurses/src/NCPkgTable.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCPkgTable.cc?rev=38310&r1=38309&r2=38310&view=diff ============================================================================== --- trunk/ncurses/src/NCPkgTable.cc (original) +++ trunk/ncurses/src/NCPkgTable.cc Wed Jun 6 13:18:22 2007 @@ -609,19 +609,24 @@ switch( tableType ) { case T_PatchPkgs: { + // if the package is installed, get the installed version if ( slbPtr->hasInstalledObj() ) { instVersion = slbPtr->installedObj()->edition().asString(); } - - // in case of YOU patches: show the version of the package which - // is contained in the patch - version = pkgPtr->edition().asString(); + // if a candidate is available, get the candidate version + if ( slbPtr->hasCandidateObj() ) + { + version = slbPtr->candidateObj()->edition().asString(); + } + else + { + version = pkgPtr->edition().asString(); + } pkgLine.push_back( version ); - // if ( Y2PM::instTarget().numPackages() > 0 ) - // doesn't make sense for YOU mode because there are always installed packages - // -> show installed version or empty column + // in case of YOU there are always installed packages + // => always add installed version (or empty column) pkgLine.push_back( instVersion ); pkgLine.push_back( pkgPtr->summary() ); // short description -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org