#include "zypp/solver/detail/ResolverInfoObsoletes.h"
#include "zypp/CapFactory.h"
#include "zypp/CapSet.h"
+#include "zypp/CapMatch.h"
#include "zypp/base/Logger.h"
/////////////////////////////////////////////////////////////////////////
Rel::EQ,
resItem->edition());
- if (info->actually_an_obsolete)
-// && !capTest.matches (cap))
+ if (info->actually_an_obsolete
+ && capTest.matches (cap) != CapMatch::yes )
{
return true;
}
//---------------------------------------------------------------------------
- /* This function also checks channels in addition to just dep relations */
- /* FIXME: rc_resItem_dep_verify_relation already checks the channel */
+ /* This function checks the dep relations */
- bool
+ CapMatch
ResItemAndDependency::verifyRelation (const Capability & dep) const
{
-#if 0
- #if PHI
- // don't check the channel, thereby honoring conflicts from installed resItems to to-be-installed resItems
return dep.matches (_dependency);
- #else
- //if (!dep.matches (_dependency)) {
- return false;
- //}
- _DBG("SPEW_DEP") << "ResItemAndDependency::verifyRelation _resItem->channel() " << _resItem->channel()->asString() << ", dep->channel()" << dep->channel()->asString() << endl;
- return _resItem->channel()->equals (dep->channel());
- #endif
-#else
- return true;
-#endif
}
///////////////////////////////////////////////////////////////////
#include "zypp/solver/detail/ResItemAndDependencyPtr.h"
#include "zypp/solver/temporary/ResItem.h"
#include "zypp/Capability.h"
+#include "zypp/CapMatch.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
// ---------------------------------- methods
- bool verifyRelation (const Capability & dep) const;
+ CapMatch verifyRelation (const Capability & dep) const;
};
///////////////////////////////////////////////////////////////////
}
-bool
+CapMatch
Match::test (ResItem_constPtr resItem, World_Ptr world) const
{
string name;
/* } */
CapFactory factory;
Capability dependency;
- bool check = false;
dependency = factory.parse ( resItem->kind(),
resItem->name(),
Rel::EQ,
resItem->edition());
-// check = _dependency.matches (dependency);
+ CapMatch check = _dependency.matches (dependency);
return check;
}
#include "zypp/solver/temporary/ResItem.h"
#include "zypp/solver/temporary/WorldPtr.h"
#include "zypp/solver/temporary/XmlNode.h"
+#include "zypp/CapMatch.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
// equality
bool equals (const Match & match) const;
- bool test (ResItem_constPtr resItem, World_Ptr world) const;
+ CapMatch test (ResItem_constPtr resItem, World_Ptr world) const;
};
///////////////////////////////////////////////////////////////////
#include "zypp/Arch.h"
#include "zypp/CapSet.h"
#include "zypp/base/Logger.h"
+#include "zypp/CapMatch.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
for (ResItemAndDependencyTable::const_iterator iter = _provides_by_name.lower_bound(dep.index()); iter != _provides_by_name.upper_bound(dep.index()); iter++) {
ResItemAndDependency_constPtr r_and_d = iter->second;
- if (r_and_d && r_and_d->verifyRelation (dep)) {
+ if (r_and_d && r_and_d->verifyRelation (dep) == CapMatch::yes) {
//fprintf (stderr, "found: %s\n", r_and_d->resItem()->asString(true).c_str());
/* If we have multiple identical resItems in RCWorld,
we want to only include the resItem that is installed and
for (ResItemAndDependencyTable::const_iterator iter = _requires_by_name.lower_bound(dep.index()); iter != _requires_by_name.upper_bound(dep.index()); iter++) {
ResItemAndDependency_constPtr r_and_d = iter->second;
- if (r_and_d ) {//&& r_and_d->dependency().matches (dep)) {
+ if (r_and_d && r_and_d->dependency().matches (dep) == CapMatch::yes) {
/* Skip dups if one of them in installed. */
if (r_and_d->resItem()->isInstalled()
if (r_and_d)
//fprintf (stderr, "==> %s verify %s ? %s\n", r_and_d->asString().c_str(), dep->asString().c_str(), r_and_d->verifyRelation (dep) ? "Y" : "N");
- if (r_and_d) {//&& r_and_d->dependency().matches (dep)) {
+ if (r_and_d && r_and_d->dependency().matches (dep) == CapMatch::yes) {
/* Skip dups if one of them in installed. */
if (r_and_d->resItem()->isInstalled()
|| installed.find(r_and_d->resItem()) == installed.end()) {
{
IsLockedInfo *info = (IsLockedInfo *)data;
- if (match->test (info->resItem, info->world)) {
+ if (match->test (info->resItem, info->world) == CapMatch::yes) {
info->is_locked = true;
return false;
}