aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-28 10:29:58 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-28 10:29:58 +0000
commit011825376d0a98394e2510a0907172400af0d673 (patch)
tree298a9728669db5b7705375baf6bd33f04e2259c4
parent8177aabe25a1638cf4480e6410aec4c1f94479e7 (diff)
downloadpaludis-011825376d0a98394e2510a0907172400af0d673.tar.gz
paludis-011825376d0a98394e2510a0907172400af0d673.tar.xz
No need for match_package to handle DepListEntry any more
-rw-r--r--paludis/dep_list.cc2
-rw-r--r--paludis/match_package.cc47
-rw-r--r--paludis/match_package.hh12
3 files changed, 1 insertions, 60 deletions
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 818c71d..0978d60 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -209,7 +209,7 @@ namespace
bool operator() (const DepListEntry & e)
{
- return match_package(env, a, e);
+ return match_package(env, a, e.package);
}
};
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index b0e25ab..013c586 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -83,50 +83,3 @@ match_package_internals::do_match(
return true;
}
-bool
-match_package_internals::do_match(
- const Environment * const env,
- const PackageDepAtom * const atom,
- const DepListEntry * const entry)
-{
- if (atom->package() != entry->package.name)
- return false;
-
- if (atom->version_spec_ptr() && ! (((entry->package.version).*
- (atom->version_operator().as_version_spec_operator()))
- (*atom->version_spec_ptr())))
- return false;
-
- if (atom->repository_ptr() && (*atom->repository_ptr() != entry->package.repository))
- return false;
-
- if (atom->slot_ptr() && (*atom->slot_ptr() != entry->metadata->slot))
- return false;
-
- if (atom->use_requirements_ptr())
- {
- for (UseRequirements::Iterator u(atom->use_requirements_ptr()->begin()),
- u_end(atom->use_requirements_ptr()->end()) ; u != u_end ; ++u)
- {
- switch (u->second)
- {
- case use_unspecified:
- continue;
-
- case use_enabled:
- if (! env->query_use(u->first, &entry->package))
- return false;
- continue;
-
- case use_disabled:
- if (env->query_use(u->first, &entry->package))
- return false;
- continue;
- }
- throw InternalError(PALUDIS_HERE, "bad UseFlagState");
- }
- }
-
- return true;
-}
-
diff --git a/paludis/match_package.hh b/paludis/match_package.hh
index 5999ab9..66bcf78 100644
--- a/paludis/match_package.hh
+++ b/paludis/match_package.hh
@@ -14,7 +14,6 @@
*/
#include <paludis/dep_atom.hh>
-#include <paludis/dep_list.hh>
#include <paludis/environment.hh>
#include <paludis/util/attributes.hh>
@@ -39,17 +38,6 @@ namespace paludis
PALUDIS_ATTRIBUTE((nonnull(1, 2, 3)));
/**
- * Do the match on a DepListEntry.
- *
- * \ingroup grpmatchpackage
- */
- bool do_match(
- const Environment * const env,
- const PackageDepAtom * const atom,
- const DepListEntry * const entry)
- PALUDIS_ATTRIBUTE((nonnull(2, 3)));
-
- /**
* Normalise env type.
*
* \ingroup grpmatchpackage