Author: schubi2 Date: Fri Sep 7 13:03:17 2007 New Revision: 7143 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7143&view=rev Log: RequirementIsMet: return true only if ALL Atoms are NOT incomplete; Bug 308252 Modified: trunk/libzypp/zypp/solver/detail/ResolverContext.cc Modified: trunk/libzypp/zypp/solver/detail/ResolverContext.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/ResolverContext.cc?rev=7143&r1=7142&r2=7143&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/ResolverContext.cc (original) +++ trunk/libzypp/zypp/solver/detail/ResolverContext.cc Fri Sep 7 13:03:17 2007 @@ -1507,6 +1507,7 @@ const PoolItem_Ref whoNeeds; const Dep cap; const bool installInfoFlag; + bool allAtomsSatisfied; RequirementMet (ResolverContext_Ptr ctx, bool *inst, const PoolItem_Ref who, const Dep & capKind, const bool instFlag) : context (ctx) @@ -1516,6 +1517,7 @@ , whoNeeds( who ) , cap( capKind ) , installInfoFlag( instFlag ) + , allAtomsSatisfied(true) { } @@ -1548,13 +1550,18 @@ } info->setCapability (match, cap); context->addInfo (info); + } else { + if (isKind<Atom>(provider.resolvable()) ) { + allAtomsSatisfied = false; + } } // ERR << "RequirementMet(" << provider << ", " << match << ") [capability " << // capability << "] -> " << (flag ? "true" : "false") << endl; - if ( installed // Checking as long as we have found an installed item - && !*installed ) + if ( (installed // Checking as long as we have found an installed item + && !*installed) + || isKind<Atom>(provider.resolvable())) // checking all Atoms return true; return ! flag; @@ -1584,7 +1591,7 @@ _XDEBUG( "ResolverContext::requirementIsMet(" << capability << ") " << (info.flag?"Y":"N") ); if (unneeded) *unneeded = info.unneeded; - return info.flag; + return info.flag && info.allAtomsSatisfied; } //--------------------------------------------------------------------------- -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org