aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-29 01:23:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-29 01:23:18 +0000
commite9505320f921473fa4f23bfec701d6ebf73bb380 (patch)
tree5d802a4b4116d673838bfd642ad24a699c6e214a
parentc00f4c9a44e332efe46464cc427a88ea49ed6f2b (diff)
downloadpaludis-e9505320f921473fa4f23bfec701d6ebf73bb380.tar.gz
paludis-e9505320f921473fa4f23bfec701d6ebf73bb380.tar.xz
Only supported EAPIs support actions
-rw-r--r--paludis/repositories/e/ebuild_id.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 7b29f60..43107aa 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -780,6 +780,9 @@ namespace
bool
EbuildID::supports_action(const SupportsActionTestBase & b) const
{
+ if (! eapi()->supported)
+ return false;
+
SupportsActionQuery q;
b.accept(q);
return q.result;
@@ -844,6 +847,9 @@ namespace
void
EbuildID::perform_action(Action & a) const
{
+ if (! eapi()->supported)
+ throw UnsupportedActionError(*this, a);
+
PerformAction b(shared_from_this());
a.accept(b);
}