aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:23:30 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:25:20 +0100
commit36ff7da31af640c47f55a1548fe2e60c54c37f21 (patch)
tree1e6f053ed5f3970886601207edef91faa9fa0526
parent37240c87e17d8b127ddb2480bbebf9ab4584379b (diff)
downloadpaludis-36ff7da31af640c47f55a1548fe2e60c54c37f21.tar.gz
paludis-36ff7da31af640c47f55a1548fe2e60c54c37f21.tar.xz
match_package support for previous (continued)
-rw-r--r--paludis/match_package.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 4d115d5..b00b34e 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -25,7 +25,9 @@
#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/slot_requirement.hh>
+#include <paludis/metadata_key.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/set.hh>
#include <tr1/functional>
#include <algorithm>
@@ -107,10 +109,20 @@ paludis::match_package(
;
}
- if (spec.repository_ptr())
- if (*spec.repository_ptr() != entry.repository()->name())
+ if (spec.in_repository_ptr())
+ if (*spec.in_repository_ptr() != entry.repository()->name())
return false;
+ if (spec.from_repository_ptr())
+ {
+ if (! entry.from_repositories_key())
+ return false;
+
+ if (entry.from_repositories_key()->value()->end() == entry.from_repositories_key()->value()->find(
+ stringify(*spec.from_repository_ptr())))
+ return false;
+ }
+
if (spec.slot_requirement_ptr())
{
SlotRequirementChecker v(entry.slot());