aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-06 17:45:02 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-07 11:32:55 +0000
commitb09f30261089985bd08c79a12d7df7f11b348a84 (patch)
tree34d9179eaa4a6af96b8c3fd8b32cdd41b674a441
parent1dff776628b235115abcda5d5fe80ceba1368b54 (diff)
downloadpaludis-b09f30261089985bd08c79a12d7df7f11b348a84.tar.gz
paludis-b09f30261089985bd08c79a12d7df7f11b348a84.tar.xz
Check for supported EAPI
-rw-r--r--paludis/repositories/e/exndbam_repository.cc6
-rw-r--r--paludis/repositories/e/vdb_repository.cc4
2 files changed, 9 insertions, 1 deletions
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index c59feb8..a26f5d3 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -494,6 +494,10 @@ ExndbamRepository::perform_uninstall(
throw ActionFailedError("Couldn't uninstall '" + stringify(*id) +
"' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
+ if (! id->eapi()->supported())
+ throw ActionFailedError("Couldn't uninstall '" + stringify(*id) +
+ "' because EAPI is unsupported");
+
std::shared_ptr<OutputManager> output_manager(a.options.make_output_manager()(a));
FSPath ver_dir(id->fs_location_key()->value().realpath());
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 8120531..f4901e8 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -416,6 +416,10 @@ VDBRepository::perform_uninstall(
throw ActionFailedError("Couldn't uninstall '" + stringify(*id) +
"' because root ('" + stringify(_imp->params.root()) + "') is not a directory");
+ if (! id->eapi()->supported())
+ throw ActionFailedError("Couldn't uninstall '" + stringify(*id) +
+ "' because EAPI is unsupported");
+
std::shared_ptr<OutputManager> output_manager(a.options.make_output_manager()(a));
std::string reinstalling_str(a.options.is_overwrite() ? "-reinstalling-" : "");