Author: jkupec Date: Tue Sep 9 19:25:14 2008 New Revision: 10984 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10984&view=rev Log: - fixed installed status for 'search -s -t product' Modified: trunk/zypper/src/search.h Modified: trunk/zypper/src/search.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/search.h?rev=10984&r1=10983&r2=10984&view=diff ============================================================================== --- trunk/zypper/src/search.h (original) +++ trunk/zypper/src/search.h Tue Sep 9 19:25:14 2008 @@ -83,23 +83,15 @@ for_(it, s->availableBegin(), s->availableEnd()) { TableRow row; - zypp::PoolItem pi = *it; - if (!s->installedEmpty()) - { - static bool installed; - installed = false; - for_(instit, s->installedBegin(), s->installedEnd()) - { - if (equalNVRA(*instit->resolvable(), *pi.resolvable())) - { - installed = true; - show_installed = false; - break; - } - } - if (installed) + // installed status + + // patters + if (zypp::traits::isPseudoInstalled(s->kind())) + { + // patches/patterns are installed if satisfied + if (pi->kind() != zypp::ResKind::srcpackage && pi.isSatisfied()) { // show only not installed if (_inst_notinst == false) @@ -111,23 +103,47 @@ // show only installed if (_inst_notinst == true) continue; - row << "v"; + row << ""; } } - // patches/patterns are installed if satisfied - else if (pi->kind() != zypp::ResKind::srcpackage && pi.isSatisfied()) + else // packages/products { - // show only not installed - if (_inst_notinst == false) - continue; - row << "i"; - } - else - { - // show only installed - if (_inst_notinst == true) - continue; - row << ""; + if (s->installedEmpty()) + { + // show only installed + if (_inst_notinst == true) + continue; + row << ""; + } + else + { + static bool installed; + installed = false; + for_(instit, s->installedBegin(), s->installedEnd()) + { + if (equalNVRA(*instit->resolvable(), *pi.resolvable())) + { + installed = true; + show_installed = false; + break; + } + } + + if (installed) + { + // show only not installed + if (_inst_notinst == false) + continue; + row << "i"; + } + else + { + // show only installed + if (_inst_notinst == true) + continue; + row << "v"; + } + } } if (_gopts.is_rug_compatible) -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org