aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-06-24 23:20:09 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-06-24 23:21:13 +0100
commit8d653af9d4c2bc10ccd2ec89f5c43a01914d47bf (patch)
treef8c8c48a3164f2631f6481342b71a194a980b565
parentcb0309f384658a1b0c321efd8f0f86ec4d525e81 (diff)
downloadpaludis-8d653af9d4c2bc10ccd2ec89f5c43a01914d47bf.tar.gz
paludis-8d653af9d4c2bc10ccd2ec89f5c43a01914d47bf.tar.xz
Don't merge KEYWORDS from eclasses; change KEYWORDS-in-eclass QA check to a QA warning. Fixes: ticket:586
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc6
-rw-r--r--paludis/repositories/e/e_installed_repository_id.hh1
-rw-r--r--paludis/repositories/e/e_repository_id.hh1
-rw-r--r--paludis/repositories/e/eapi.cc4
-rw-r--r--paludis/repositories/e/eapi.sr4
-rw-r--r--paludis/repositories/e/eapis/0.conf7
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf10
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf7
-rw-r--r--paludis/repositories/e/ebuild.cc5
-rw-r--r--paludis/repositories/e/ebuild/0/eclass_functions.bash23
-rw-r--r--paludis/repositories/e/ebuild/0/exlib_functions.bash23
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash23
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash23
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc7
-rw-r--r--paludis/repositories/e/ebuild_id.cc16
-rw-r--r--paludis/repositories/e/ebuild_id.hh2
-rw-r--r--paludis/repositories/e/qa/keywords_key.cc7
-rw-r--r--ruby/package_id_TEST.rb2
19 files changed, 102 insertions, 71 deletions
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 3346857..0644f59 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -489,12 +489,6 @@ EInstalledRepositoryID::keywords_key() const
return std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >();
}
-const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
-EInstalledRepositoryID::eclass_keywords_key() const
-{
- return std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >();
-}
-
const std::tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> >
EInstalledRepositoryID::use_key() const
{
diff --git a/paludis/repositories/e/e_installed_repository_id.hh b/paludis/repositories/e/e_installed_repository_id.hh
index f3b5ff7..1cbe5b7 100644
--- a/paludis/repositories/e/e_installed_repository_id.hh
+++ b/paludis/repositories/e/e_installed_repository_id.hh
@@ -60,7 +60,6 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > virtual_for_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
- virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/e/e_repository_id.hh b/paludis/repositories/e/e_repository_id.hh
index 94358b4..3d7525f 100644
--- a/paludis/repositories/e/e_repository_id.hh
+++ b/paludis/repositories/e/e_repository_id.hh
@@ -36,7 +36,6 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const = 0;
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<RestrictSpecTree> > restrict_key() const = 0;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> > use_key() const = 0;
- virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const = 0;
virtual std::tr1::shared_ptr<const Set<std::string> > breaks_portage() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index aa85dd5..568dd74 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -132,6 +132,7 @@ namespace paludis
.directory_variables(k.get("directory_variables"))
.directory_if_exists_variables(k.get("directory_if_exists_variables"))
.ebuild_must_not_set_variables(k.get("ebuild_must_not_set_variables"))
+ .eclass_must_not_set_variables(k.get("eclass_must_not_set_variables"))
.vdb_from_env_variables(k.get("vdb_from_env_variables"))
.vdb_from_env_unless_empty_variables(k.get("vdb_from_env_unless_empty_variables"))
.binary_from_env_variables(k.get("binary_from_env_variables"))
@@ -183,7 +184,6 @@ namespace paludis
.metadata_license(k.get("metadata_license"))
.metadata_description(k.get("metadata_description"))
.metadata_keywords(k.get("metadata_keywords"))
- .metadata_eclass_keywords(k.get("metadata_eclass_keywords"))
.metadata_inherited(k.get("metadata_inherited"))
.metadata_iuse(k.get("metadata_iuse"))
.metadata_pdepend(k.get("metadata_pdepend"))
@@ -200,7 +200,6 @@ namespace paludis
.description_license(k.get("description_license"))
.description_description(k.get("description_description"))
.description_keywords(k.get("description_keywords"))
- .description_eclass_keywords(k.get("description_eclass_keywords"))
.description_inherited(k.get("description_inherited"))
.description_iuse(k.get("description_iuse"))
.description_pdepend(k.get("description_pdepend"))
@@ -217,7 +216,6 @@ namespace paludis
.flat_cache_license(destringify<int>(k.get("flat_cache_license")))
.flat_cache_description(destringify<int>(k.get("flat_cache_description")))
.flat_cache_keywords(destringify<int>(k.get("flat_cache_keywords")))
- .flat_cache_eclass_keywords(destringify<int>(k.get("flat_cache_eclass_keywords")))
.flat_cache_inherited(destringify<int>(k.get("flat_cache_inherited")))
.flat_cache_iuse(destringify<int>(k.get("flat_cache_iuse")))
.flat_cache_pdepend(destringify<int>(k.get("flat_cache_pdepend")))
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index cefc6da..e43eb33 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -40,7 +40,6 @@ make_class_EAPIEbuildMetadataVariables()
key metadata_license std::string
key metadata_description std::string
key metadata_keywords std::string
- key metadata_eclass_keywords std::string
key metadata_inherited std::string
key metadata_iuse std::string
key metadata_pdepend std::string
@@ -58,7 +57,6 @@ make_class_EAPIEbuildMetadataVariables()
key description_license std::string
key description_description std::string
key description_keywords std::string
- key description_eclass_keywords std::string
key description_inherited std::string
key description_iuse std::string
key description_pdepend std::string
@@ -77,7 +75,6 @@ make_class_EAPIEbuildMetadataVariables()
key flat_cache_license int
key flat_cache_description int
key flat_cache_keywords int
- key flat_cache_eclass_keywords int
key flat_cache_inherited int
key flat_cache_iuse int
key flat_cache_pdepend int
@@ -140,6 +137,7 @@ make_class_EAPIEbuildOptions()
key directory_variables std::string
key directory_if_exists_variables std::string
key ebuild_must_not_set_variables std::string
+ key eclass_must_not_set_variables std::string
key source_merged_variables std::string
key bracket_merged_variables std::string
key must_not_change_variables std::string
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 85f7b32..710f114 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -50,8 +50,10 @@ directory_if_exists_variables = \
ebuild_must_not_set_variables =
+eclass_must_not_set_variables = qa:KEYWORDS
+
source_merged_variables = \
- IUSE DEPEND RDEPEND PDEPEND KEYWORDS
+ IUSE DEPEND RDEPEND PDEPEND
bracket_merged_variables =
@@ -124,7 +126,6 @@ ebuild_config = \
description_build_depend = Build dependencies
description_description = Description
description_eapi = EAPI
-description_eclass_keywords = Eclass Keywords
description_homepage = Homepage
description_inherited = Inherited
description_iuse = Relevant USE flags
@@ -140,7 +141,6 @@ description_src_uri = Source URI
metadata_build_depend = DEPEND
metadata_description = DESCRIPTION
metadata_eapi = EAPI
-metadata_eclass_keywords = E_KEYWORDS
metadata_homepage = HOMEPAGE
metadata_inherited = INHERITED
metadata_iuse = IUSE
@@ -157,7 +157,6 @@ flat_cache_minimum_size = 15
flat_cache_build_depend = 0
flat_cache_description = 7
flat_cache_eapi = 14
-flat_cache_eclass_keywords = -1
flat_cache_dependencies = -1
flat_cache_homepage = 5
flat_cache_inherited = 9
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index bb75015..45c4ad8 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -52,13 +52,12 @@ directory_if_exists_variables = \
build:FILESDIR
ebuild_must_not_set_variables = \
- DEPEND RDEPEND PDEPEND PROVIDE
+ DEPEND RDEPEND PDEPEND PROVIDE USE IUSE KEYWORDS
-ebuild_must_not_set_variables = \
- USE IUSE KEYWORDS
+eclass_must_not_set_variables = PLATFORMS
source_merged_variables = \
- OPTIONS MYOPTIONS PLATFORMS
+ MYOPTIONS
bracket_merged_variables = \
DEPENDENCIES
@@ -136,7 +135,6 @@ metadata_homepage = HOMEPAGE
metadata_license = LICENSE
metadata_description = DESCRIPTION
metadata_keywords = PLATFORMS
-metadata_eclass_keywords = E_PLATFORMS
metadata_inherited = INHERITED
metadata_iuse = MYOPTIONS
metadata_pdepend =
@@ -147,7 +145,6 @@ metadata_dependencies = DEPENDENCIES
description_build_depend =
description_description = Description
description_eapi = EAPI
-description_eclass_keywords = Eclass Platforms
description_homepage = Homepage
description_inherited = Inherited
description_iuse = Relevant option flags
@@ -167,7 +164,6 @@ flat_cache_build_depend = -1
flat_cache_description = 7
flat_cache_eapi = 14
flat_cache_dependencies = 1
-flat_cache_eclass_keywords = 11
flat_cache_homepage = 5
flat_cache_inherited = 9
flat_cache_iuse = 10
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index f5d34f5..83199c6 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -53,10 +53,10 @@ directory_if_exists_variables = \
ebuild_must_not_set_variables =
-ebuild_must_not_set_variables =
+eclass_must_not_set_variables = qa:KEYWORDS
source_merged_variables = \
- IUSE KEYWORDS
+ IUSE
bracket_merged_variables = \
DEPEND RDEPEND PDEPEND
@@ -137,7 +137,6 @@ metadata_homepage = HOMEPAGE
metadata_license = LICENSE
metadata_description = DESCRIPTION
metadata_keywords = KEYWORDS
-metadata_eclass_keywords = E_KEYWORDS
metadata_inherited = INHERITED
metadata_iuse = IUSE
metadata_pdepend = PDEPEND
@@ -147,7 +146,6 @@ metadata_eapi = EAPI
description_build_depend = Build dependencies
description_description = Description
description_eapi = EAPI
-description_eclass_keywords = Eclass Keywords
description_homepage = Homepage
description_inherited = Inherited
description_iuse = Relevant use flags
@@ -165,7 +163,6 @@ flat_cache_minimum_size = 15
flat_cache_build_depend = 0
flat_cache_description = 7
flat_cache_eapi = 14
-flat_cache_eclass_keywords = -1
flat_cache_dependencies = -1
flat_cache_homepage = 5
flat_cache_inherited = 9
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 5012063..0ac2194 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -149,6 +149,8 @@ EbuildCommand::operator() ()
(*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].directory_variables)
.with_setenv("PALUDIS_EBUILD_MUST_NOT_SET_VARIABLES",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ebuild_must_not_set_variables)
+ .with_setenv("PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES",
+ (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].eclass_must_not_set_variables)
.with_setenv("PALUDIS_SAVE_VARIABLES",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].save_variables)
.with_setenv("PALUDIS_SAVE_BASE_VARIABLES",
@@ -460,9 +462,6 @@ EbuildMetadataCommand::load(const std::tr1::shared_ptr<const EbuildID> & id)
if (! m.metadata_keywords.empty())
id->load_keywords(m.metadata_keywords, m.description_keywords, get(keys, m.metadata_keywords));
- if (! m.metadata_eclass_keywords.empty())
- id->load_eclass_keywords(m.metadata_eclass_keywords, m.description_eclass_keywords, get(keys, m.metadata_eclass_keywords));
-
if (! m.metadata_restrict.empty())
id->load_restrict(m.metadata_restrict, m.description_restrict, get(keys, m.metadata_restrict));
diff --git a/paludis/repositories/e/ebuild/0/eclass_functions.bash b/paludis/repositories/e/ebuild/0/eclass_functions.bash
index 3adfb7e..14ded47 100644
--- a/paludis/repositories/e/ebuild/0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/0/eclass_functions.bash
@@ -47,7 +47,7 @@ inherit()
{
[[ -n "${PALUDIS_SKIP_INHERIT}" ]] && return
- local e ee location= v
+ local e ee location= v v_qa
for e in "$@" ; do
for ee in ${ECLASSDIRS:-${ECLASSDIR}} ; do
[[ -f "${ee}/${e}.eclass" ]] && location="${ee}/${e}.eclass"
@@ -62,6 +62,13 @@ inherit()
unset ${v}
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ done
+
[[ -z "${location}" ]] && die "Error finding eclass ${e}"
source "${location}" || die "Error sourcing eclass ${e}"
hasq "${ECLASS}" ${INHERITED} || export INHERITED="${INHERITED} ${ECLASS}"
@@ -81,6 +88,20 @@ inherit()
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ if [[ ${!c_v} != ${!v} || ${!u_v} != ${!v-unset} ]]; then
+ if [[ ${v} == ${v_qa} ]] ; then
+ die "Variable '${v}' illegally set by ${location}"
+ else
+ ebuild_notice "qa" "Variable '${v}' should not be set by ${location}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ fi
+ fi
+ done
+
export ECLASS="${old_ECLASS}"
done
}
diff --git a/paludis/repositories/e/ebuild/0/exlib_functions.bash b/paludis/repositories/e/ebuild/0/exlib_functions.bash
index 5e163c2..fd77bba 100644
--- a/paludis/repositories/e/ebuild/0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/0/exlib_functions.bash
@@ -42,7 +42,7 @@ export_exlib_phases()
require()
{
ebuild_notice "debug" "Command 'require ${@}', using EXLIBSDIRS '${EXLIBSDIRS}'"
- local e ee location= v
+ local e ee location= v v_qa
for e in "$@" ; do
for ee in ${EXLIBSDIRS} ; do
[[ -f "${ee}/${e}.exlib" ]] && location="${ee}/${e}.exlib"
@@ -57,6 +57,13 @@ require()
unset ${v}
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ done
+
[[ -z "${location}" ]] && die "Error finding exlib ${e} in ${EXLIBSDIRS}"
source "${location}" || die "Error sourcing exlib ${e}"
hasq "${CURRENT_EXLIB}" ${INHERITED} || export INHERITED="${INHERITED} ${CURRENT_EXLIB}"
@@ -76,6 +83,20 @@ require()
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ if [[ ${!c_v} != ${!v} || ${!u_v} != ${!v-unset} ]]; then
+ if [[ ${v} == ${v_qa} ]] ; then
+ die "Variable '${v}' illegally set by ${location}"
+ else
+ ebuild_notice "qa" "Variable '${v}' should not be set by ${location}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ fi
+ fi
+ done
+
export CURRENT_EXLIB="${old_CURRENT_EXLIB}"
done
}
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 001a5cf..7cec38c 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -29,7 +29,7 @@ export LC_ALL=C
# The list below should include all variables from all EAPIs
EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SRC_URI RESTRICT \
LICENSE KEYWORDS INHERITED PROVIDE HOMEPAGE DESCRIPTION DEPENDENCIES \
- E_IUSE E_DEPEND E_RDEPEND E_PDEPEND E_KEYWORDS PLATFORMS E_PLATFORMS \
+ E_IUSE E_DEPEND E_RDEPEND E_PDEPEND PLATFORMS \
MYOPTIONS E_MYOPTIONS E_DEPENDENCIES BINARY_KEYWORDS BINARY_URI \
GENERATED_USING GENERATED_TIME BINARY_PLATFORMS"
unset -v ${EBUILD_METADATA_VARIABLES} ${PALUDIS_EBUILD_MUST_NOT_SET_VARIABLES}
diff --git a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
index 81128f4..fa6d6ef 100644
--- a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
@@ -46,7 +46,7 @@ inherit()
{
[[ -n "${PALUDIS_SKIP_INHERIT}" ]] && return
- local e ee location= v
+ local e ee location= v v_qa
for e in "$@" ; do
for ee in ${ECLASSDIRS:-${ECLASSDIR}} ; do
[[ -f "${ee}/${e}.eclass" ]] && location="${ee}/${e}.eclass"
@@ -61,6 +61,13 @@ inherit()
unset ${v}
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ done
+
[[ -z "${location}" ]] && die "Error finding eclass ${e}"
source "${location}" || die "Error sourcing eclass ${e}"
hasq "${ECLASS}" ${INHERITED} || export INHERITED="${INHERITED} ${ECLASS}"
@@ -80,6 +87,20 @@ inherit()
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ if [[ ${!c_v} != ${!v} || ${!u_v} != ${!v-unset} ]]; then
+ if [[ ${v} == ${v_qa} ]] ; then
+ die "Variable '${v}' illegally set by ${location}"
+ else
+ ebuild_notice "qa" "Variable '${v}' should not be set by ${location}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ fi
+ fi
+ done
+
export ECLASS="${old_ECLASS}"
done
}
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index b759410..2132b4b 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -41,7 +41,7 @@ export_exlib_phases()
require()
{
ebuild_notice "debug" "Command 'require ${@}', using EXLIBSDIRS '${EXLIBSDIRS}'"
- local e ee location= v
+ local e ee location= v v_qa
for e in "$@" ; do
for ee in ${EXLIBSDIRS} ; do
[[ -f "${ee}/${e}.exlib" ]] && location="${ee}/${e}.exlib"
@@ -56,6 +56,13 @@ require()
unset ${v}
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ done
+
[[ -z "${location}" ]] && die "Error finding exlib ${e} in ${EXLIBSDIRS}"
source "${location}" || die "Error sourcing exlib ${e}"
hasq "${CURRENT_EXLIB}" ${INHERITED} || export INHERITED="${INHERITED} ${CURRENT_EXLIB}"
@@ -75,6 +82,20 @@ require()
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
+ for v_qa in ${PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES} ; do
+ local v=${v_qa#qa:}
+ local c_v="current_${v}" u_v="unset_${v}"
+ if [[ ${!c_v} != ${!v} || ${!u_v} != ${!v-unset} ]]; then
+ if [[ ${v} == ${v_qa} ]] ; then
+ die "Variable '${v}' illegally set by ${location}"
+ else
+ ebuild_notice "qa" "Variable '${v}' should not be set by ${location}"
+ export -n ${c_v}="${!v}"
+ export -n ${u_v}="${!v-unset}"
+ fi
+ fi
+ done
+
export CURRENT_EXLIB="${old_CURRENT_EXLIB}"
done
}
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache.cc b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
index 9ce7ba7..2c50ca5 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
@@ -258,13 +258,6 @@ EbuildFlatMetadataCache::save(const std::tr1::shared_ptr<const EbuildID> & id)
cache << s << std::endl;
}
- else if (x == m.flat_cache_eclass_keywords)
- {
- if (id->eclass_keywords_key())
- cache << join(id->eclass_keywords_key()->value()->begin(), id->eclass_keywords_key()->value()->end(), " ") << std::endl;
- else
- cache << std::endl;
- }
else if (x == m.flat_cache_use)
{
if (id->use_key())
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index ededd33..59bd36c 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -82,7 +82,6 @@ namespace paludis
mutable std::tr1::shared_ptr<const ESimpleURIKey> homepage;
mutable std::tr1::shared_ptr<const ELicenseKey> license;
mutable std::tr1::shared_ptr<const EKeywordsKey> keywords;
- mutable std::tr1::shared_ptr<const EKeywordsKey> eclass_keywords;
mutable std::tr1::shared_ptr<const EIUseKey> iuse;
mutable std::tr1::shared_ptr<const EInheritedKey> inherited;
mutable std::tr1::shared_ptr<const EUseKey> use;
@@ -478,13 +477,6 @@ EbuildID::keywords_key() const
return _imp->keywords;
}
-const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> >
-EbuildID::eclass_keywords_key() const
-{
- need_keys_added();
- return _imp->eclass_keywords;
-}
-
const std::tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> >
EbuildID::iuse_key() const
{
@@ -757,14 +749,6 @@ EbuildID::load_keywords(const std::string & r, const std::string & h, const std:
}
void
-EbuildID::load_eclass_keywords(const std::string & r, const std::string & h, const std::string & v) const
-{
- Lock l(_imp->mutex);
- _imp->eclass_keywords.reset(new EKeywordsKey(_imp->environment, shared_from_this(), r, h, v, mkt_internal));
- add_metadata_key(_imp->eclass_keywords);
-}
-
-void
EbuildID::load_inherited(const std::string & r, const std::string & h, const std::string & v) const
{
Lock l(_imp->mutex);
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index e87e3d8..d7b6680 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -65,7 +65,6 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > virtual_for_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > keywords_key() const;
- virtual const std::tr1::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > eclass_keywords_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<IUseFlagSet> > iuse_key() const;
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
@@ -114,7 +113,6 @@ namespace paludis
void load_use(const std::string &, const std::string &, const std::string &) const;
void load_inherited(const std::string &, const std::string &, const std::string &) const;
void load_keywords(const std::string &, const std::string &, const std::string &) const;
- void load_eclass_keywords(const std::string &, const std::string &, const std::string &) const;
void load_restrict(const std::string &, const std::string &, const std::string &) const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/qa/keywords_key.cc b/paludis/repositories/e/qa/keywords_key.cc
index 5fac5b9..d7c565e 100644
--- a/paludis/repositories/e/qa/keywords_key.cc
+++ b/paludis/repositories/e/qa/keywords_key.cc
@@ -60,13 +60,6 @@ paludis::erepository::keywords_key_check(
"Empty '" + id->keywords_key()->raw_name() + "' (use package.mask and keyword properly)")
.with_associated_id(id)
.with_associated_key(id, id->keywords_key()));
-
- if (id->eclass_keywords_key() && ! id->eclass_keywords_key()->value()->empty())
- reporter.message(QAMessage(entry, qaml_normal, name,
- "'" + id->keywords_key()->raw_name() + "' was altered by an eclass")
- .with_associated_id(id)
- .with_associated_key(id, id->keywords_key())
- .with_associated_key(id, id->eclass_keywords_key()));
}
catch (const InternalError &)
{
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index 47e33ec..24486fa 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -159,7 +159,7 @@ module Paludis
def test_each_metadata
keys = { "DESCRIPTION" => 1, "IUSE" => 1, "INHERITED" => 1, "KEYWORDS" => 1, "EAPI" => 1, "repository_mask" => 1,
"profile_mask" => 1, "DEPEND" => 1, "RDEPEND" => 1, "PDEPEND" => 1, "LICENSE" => 1, "PROVIDE" => 1,
- "RESTRICT" => 1, "SRC_URI" => 1, "HOMEPAGE" => 1, "EBUILD" => 1, "E_KEYWORDS" => 1 }
+ "RESTRICT" => 1, "SRC_URI" => 1, "HOMEPAGE" => 1, "EBUILD" => 1 }
pid_testrepo.each_metadata do | key |
assert keys.has_key?(key.raw_name)
keys.delete key.raw_name