aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-17 01:48:45 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-17 01:48:45 +0000
commitf2b01ea48f3752d5dbda737daa88b87dbec68421 (patch)
tree685c54a912487580509c93f459e4de7c7f99b9ae
parent584f9d58222cac6d5092d2262e2e5229ffca8890 (diff)
downloadpaludis-f2b01ea48f3752d5dbda737daa88b87dbec68421.tar.gz
paludis-f2b01ea48f3752d5dbda737daa88b87dbec68421.tar.xz
QA checks for KEYWORDS in eclass
-rw-r--r--ebuild/depend.bash3
-rw-r--r--ebuild/eclass_functions.bash5
-rw-r--r--paludis/portage_repository.cc1
-rw-r--r--paludis/qa/keywords_check.cc3
-rw-r--r--paludis/version_metadata.hh1
5 files changed, 11 insertions, 2 deletions
diff --git a/ebuild/depend.bash b/ebuild/depend.bash
index 7fac060..51d0692 100644
--- a/ebuild/depend.bash
+++ b/ebuild/depend.bash
@@ -31,7 +31,8 @@ ebuild_f_depend()
PDEPEND="${PDEPEND} ${E_PDEPEND}"
for key in DEPEND RDEPEND PDEPEND IUSE SLOT SRC_URI RESTRICT LICENSE \
- KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION ; do
+ KEYWORDS INHERITED PROVIDE EAPI HOMEPAGE DESCRIPTION E_IUSE \
+ E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS ; do
set -o noglob
local k=${!key}
k=${k/\\/\\\\}
diff --git a/ebuild/eclass_functions.bash b/ebuild/eclass_functions.bash
index 7f647c4..327727d 100644
--- a/ebuild/eclass_functions.bash
+++ b/ebuild/eclass_functions.bash
@@ -41,8 +41,9 @@ inherit()
local current_IUSE="${IUSE}" current_DEPEND="${DEPEND}"
local current_RDEPEND="${RDEPEND}" current_PDEPEND="${PDEPEND}"
+ local current_KEYWORDS="${KEYWORDS}"
- unset IUSE DEPEND RDEPEND PDEPEND
+ unset IUSE DEPEND RDEPEND PDEPEND KEYWORDS
source "${location}" || die "Error sourcing eclass ${e}"
hasq "${ECLASS}" ${INHERITED} || export INHERITED="${INHERITED} ${ECLASS}"
@@ -51,11 +52,13 @@ inherit()
E_PDEPEND="${E_PDEPEND} ${PDEPEND}"
E_RDEPEND="${E_RDEPEND} ${RDEPEND}"
E_DEPEND="${E_DEPEND} ${DEPEND}"
+ E_KEYWORDS="${KEYWORDS} ${E_KEYWORDS}"
IUSE="${current_IUSE}"
DEPEND="${current_DEPEND}"
RDEPEND="${current_RDEPEND}"
PDEPEND="${current_PDEPEND}"
+ KEYWORDS="${current_KEYWORDS}"
export ECLASS="${old_ECLASS}"
done
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index dabb4b3..12f7ed9 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -634,6 +634,7 @@ PortageRepository::do_version_metadata(
result->set(vmk_provide, f.get("PROVIDE"));
result->set(vmk_eapi, f.get("EAPI"));
result->set(vmk_virtual, "");
+ result->set(vmk_e_keywords, f.get("E_KEYWORDS"));
if (prog.exit_status())
{
diff --git a/paludis/qa/keywords_check.cc b/paludis/qa/keywords_check.cc
index fb85d2f..7b7fbd0 100644
--- a/paludis/qa/keywords_check.cc
+++ b/paludis/qa/keywords_check.cc
@@ -51,6 +51,9 @@ KeywordsCheck::operator() (const EbuildCheckData & e) const
{
result << Message(qal_major, "Bad entries in KEYWORDS");
}
+
+ if (! metadata->get(vmk_e_keywords).empty())
+ result << Message(qal_major, "KEYWORDS was altered by an eclass");
}
catch (const InternalError &)
{
diff --git a/paludis/version_metadata.hh b/paludis/version_metadata.hh
index a35c2d0..037cb7a 100644
--- a/paludis/version_metadata.hh
+++ b/paludis/version_metadata.hh
@@ -52,6 +52,7 @@ namespace paludis
vmk_homepage, ///< HOMEPAGE
vmk_description, ///< DESCRIPTION
vmk_virtual, ///< Are we a virtual for something (empty is no)?
+ vmk_e_keywords, ///< KEYWORDS from ECLASS, for QA checks
last_vmk ///< Number of items (keep at end!)
};