Author: jkupec Date: Tue May 20 13:58:11 2008 New Revision: 10164 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10164&view=rev Log: - show correct patch list Modified: trunk/zypper/src/zypper-misc.cc Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=10164&r1=10163&r2=10164&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Tue May 20 13:58:11 2008 @@ -1605,10 +1605,24 @@ unsigned int patchcount=0; bool pkg_mgr_available = false; + Patch::constPtr patch; ResPool::byKind_iterator it = pool.byKindBegin(ResKind::patch), e = pool.byKindEnd(ResKind::patch); + + // check whether there are packages affecting the update stack + for (; it != e; ++it) + { + patch = asKind<Patch>(it->resolvable()); + if (it->isRelevant() && !it->isSatisfied() && patch->restartSuggested()) + { + pkg_mgr_available = true; + break; + } + } + + it = pool.byKindBegin(ResKind::patch); for (; it != e; ++it, ++patchcount) { if (it->isRelevant() && !it->isSatisfied()) @@ -1616,9 +1630,6 @@ ResObject::constPtr res = it->resolvable(); Patch::constPtr patch = asKind<Patch>(res); - if (patch->restartSuggested()) - pkg_mgr_available = true; - // if updates stack patches are available, show only those if ((pkg_mgr_available && patch->restartSuggested()) || !pkg_mgr_available) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org