aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2008-01-16 04:03:46 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2008-01-16 04:03:46 +0000
commitaa261ee83c6787a0b5daf35ee4dfafb209231749 (patch)
tree6d41addef399622a9c002f4eb9cd60f2559a2b7b
parent3cef71bd6af9ab749dee606b3b393f286d9593f4 (diff)
downloadpaludis-aa261ee83c6787a0b5daf35ee4dfafb209231749.tar.gz
paludis-aa261ee83c6787a0b5daf35ee4dfafb209231749.tar.xz
Add bracket_merged_variables EAPI configuration variable.
This should make things with labels work properly in eclasses/exlibs.
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.sr1
-rw-r--r--paludis/repositories/e/eapis/0.conf4
-rw-r--r--paludis/repositories/e/eapis/1.conf4
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf5
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf7
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/0/eclass_functions.bash9
-rw-r--r--paludis/repositories/e/ebuild/0/exlib_functions.bash9
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash14
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash9
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash9
12 files changed, 57 insertions, 17 deletions
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 70869dd..4fcf635 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -116,6 +116,7 @@ namespace paludis
.vdb_from_env_variables(k.get("vdb_from_env_variables"))
.vdb_from_env_unless_empty_variables(k.get("vdb_from_env_unless_empty_variables"))
.source_merged_variables(k.get("source_merged_variables"))
+ .bracket_merged_variables(k.get("bracket_merged_variables"))
.must_not_change_variables(k.get("must_not_change_variables"))
.save_variables(k.get("save_variables"))
.save_base_variables(k.get("save_base_variables"))
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index 5085fd8..5891013 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -127,6 +127,7 @@ make_class_EAPIEbuildOptions()
key directory_if_exists_variables std::string
key ebuild_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
key save_variables std::string
key save_base_variables std::string
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 2a0745d..d71850c 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -43,6 +43,8 @@ ebuild_must_not_set_variables =
source_merged_variables = \
IUSE DEPEND RDEPEND PDEPEND KEYWORDS
+bracket_merged_variables =
+
must_not_change_variables = \
SLOT
@@ -64,7 +66,7 @@ save_unmodifiable_variables = \
PALUDIS_DIRECTORY_IF_EXISTS_VARIABLES PALUDIS_SOURCE_MERGED_VARIABLES \
PALUDIS_MUST_NOT_CHANGE_VARIABLES PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND \
ECLASSDIR ECLASSDIRS EXLIBSDIRS PALUDIS_VARIABLE PALUDIS_PROFILE_DIR \
- PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR
+ PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR PALUDIS_BRACKET_MERGED_VARIABLES
ebuild_install = \
: prepare ; \
diff --git a/paludis/repositories/e/eapis/1.conf b/paludis/repositories/e/eapis/1.conf
index cc87a0e..dad827b 100644
--- a/paludis/repositories/e/eapis/1.conf
+++ b/paludis/repositories/e/eapis/1.conf
@@ -43,6 +43,8 @@ ebuild_must_not_set_variables =
source_merged_variables = \
IUSE DEPEND RDEPEND PDEPEND KEYWORDS
+bracket_merged_variables =
+
must_not_change_variables = \
SLOT
@@ -64,7 +66,7 @@ save_unmodifiable_variables = \
PALUDIS_DIRECTORY_IF_EXISTS_VARIABLES PALUDIS_SOURCE_MERGED_VARIABLES \
PALUDIS_MUST_NOT_CHANGE_VARIABLES PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND \
ECLASSDIR ECLASSDIRS EXLIBSDIRS PALUDIS_VARIABLE PALUDIS_PROFILE_DIR \
- PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR
+ PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR PALUDIS_BRACKET_MERGED_VARIABLES
ebuild_install = \
: prepare ; \
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 22c6b8f..7dbd1c8 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -49,6 +49,9 @@ ebuild_must_not_set_variables = \
source_merged_variables = \
OPTIONS MYOPTIONS PLATFORMS
+bracket_merged_variables = \
+ DEPENDENCIES
+
save_variables = \
OPTIONS SUBOPTIONS HIDDEN_SUBOPTIONS \$SUBOPTIONS
@@ -67,7 +70,7 @@ save_unmodifiable_variables = \
PALUDIS_DIRECTORY_IF_EXISTS_VARIABLES PALUDIS_SOURCE_MERGED_VARIABLES \
PALUDIS_MUST_NOT_CHANGE_VARIABLES PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND \
ECLASSDIR ECLASSDIRS EXLIBSDIRS PALUDIS_VARIABLE PALUDIS_PROFILE_DIR \
- PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR
+ PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR PALUDIS_BRACKET_MERGED_VARIABLES
ebuild_install = \
: prepare ; \
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 8b20ae5..0fd5825 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -45,7 +45,10 @@ ebuild_must_not_set_variables =
ebuild_must_not_set_variables =
source_merged_variables = \
- IUSE DEPEND RDEPEND PDEPEND KEYWORDS
+ IUSE KEYWORDS
+
+bracket_merged_variables = \
+ DEPEND RDEPEND PDEPEND
must_not_change_variables = \
SLOT
@@ -68,7 +71,7 @@ save_unmodifiable_variables = \
PALUDIS_DIRECTORY_IF_EXISTS_VARIABLES PALUDIS_SOURCE_MERGED_VARIABLES \
PALUDIS_MUST_NOT_CHANGE_VARIABLES PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND \
ECLASSDIR ECLASSDIRS EXLIBSDIRS PALUDIS_VARIABLE PALUDIS_PROFILE_DIR \
- PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR
+ PALUDIS_PROFILE_DIRS PALUDIS_LOADSAVEENV_DIR PALUDIS_BRACKET_MERGED_VARIABLES
ebuild_install = \
: prepare ; \
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 9a9cf24..1412d23 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -160,6 +160,8 @@ EbuildCommand::operator() ()
params.package_id->eapi()->supported->ebuild_options->directory_if_exists_variables)
.with_setenv("PALUDIS_SOURCE_MERGED_VARIABLES",
params.package_id->eapi()->supported->ebuild_options->source_merged_variables)
+ .with_setenv("PALUDIS_BRACKET_MERGED_VARIABLES",
+ params.package_id->eapi()->supported->ebuild_options->bracket_merged_variables)
.with_setenv("PALUDIS_MUST_NOT_CHANGE_VARIABLES",
params.package_id->eapi()->supported->ebuild_options->must_not_change_variables)
.with_setenv("PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND",
diff --git a/paludis/repositories/e/ebuild/0/eclass_functions.bash b/paludis/repositories/e/ebuild/0/eclass_functions.bash
index 5aed2e6..c4e0a99 100644
--- a/paludis/repositories/e/ebuild/0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/0/eclass_functions.bash
@@ -55,7 +55,7 @@ inherit()
local old_ECLASS="${ECLASS}"
export ECLASS="${e}"
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
local ${c_v}="${!v}"
local ${u_v}="${!v-unset}"
@@ -71,7 +71,12 @@ inherit()
export ${e_v}="${!e_v} ${!v}"
done
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
+ local e_v="E_${v}"
+ export ${e_v}="${!e_v} ( ${!v} )"
+ done
+
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
diff --git a/paludis/repositories/e/ebuild/0/exlib_functions.bash b/paludis/repositories/e/ebuild/0/exlib_functions.bash
index de79aee..2a0238a 100644
--- a/paludis/repositories/e/ebuild/0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/0/exlib_functions.bash
@@ -50,7 +50,7 @@ require()
local old_CURRENT_EXLIB="${CURRENT_EXLIB}"
export CURRENT_EXLIB="${e}"
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
local ${c_v}="${!v}"
local ${u_v}="${!v-unset}"
@@ -66,7 +66,12 @@ require()
export ${e_v}="${!e_v} ${!v}"
done
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
+ local e_v="E_${v}"
+ export ${e_v}="${!e_v} ( ${!v} )"
+ done
+
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index e09e862..d9cd3a7 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -31,7 +31,7 @@ eval unset LANG ${!LC_*}
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 \
- MYOPTIONS E_MYOPTIONS"
+ MYOPTIONS E_MYOPTIONS E_DEPENDENCIES"
unset -v ${EBUILD_METADATA_VARIABLES} ${PALUDIS_EBUILD_MUST_NOT_SET_VARIABLES}
# These can be set by C++
EBUILD_METADATA_VARIABLES="${EBUILD_METADATA_VARIABLES} SLOT EAPI"
@@ -258,7 +258,8 @@ export REAL_CHOST="${CHOST}"
ebuild_scrub_environment()
{
(
- ebuild_safe_source "${1}" PATH PALUDIS_SOURCE_MERGED_VARIABLES || exit 1
+ ebuild_safe_source "${1}" PATH PALUDIS_SOURCE_MERGED_VARIABLES \
+ PALUDIS_BRACKET_MERGED_VARIABLES || exit 1
unset -f diefunc perform_hook inherit builtin_loadenv builtin_saveenv
unset -f ebuild_safe_source portageq best_version has_version paludis_pipe_command
@@ -284,7 +285,7 @@ ebuild_scrub_environment()
unset -v ebuild EBUILD
unset -v $(
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
echo E_${v}
done )
@@ -350,7 +351,7 @@ ebuild_load_environment()
ebuild_load_ebuild()
{
export EBUILD="${1}"
- unset ${SOURCE_MERGED_VARIABLES}
+ unset ${SOURCE_MERGED_VARIABLES} ${BRACKET_MERGED_VARIABLES}
local v e_v
for v in ${PALUDIS_MUST_NOT_CHANGE_VARIABLES} ; do
@@ -370,6 +371,11 @@ ebuild_load_ebuild()
export -n ${v}="${!v} ${!e_v}"
done
+ for v in ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
+ e_v=E_${v}
+ export -n ${v}="( ${!v} ) ${!e_v}"
+ done
+
[[ ${EAPI-unset} == "unset" ]] && EAPI="0"
for v in ${PALUDIS_MUST_NOT_CHANGE_VARIABLES} ; do
diff --git a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
index a91282e..1e13085 100644
--- a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
@@ -55,7 +55,7 @@ inherit()
local old_ECLASS="${ECLASS}"
export ECLASS="${e}"
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
local ${c_v}="${!v}"
local ${u_v}="${!v-unset}"
@@ -71,7 +71,12 @@ inherit()
export ${e_v}="${!e_v} ${!v}"
done
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
+ local e_v="E_${v}"
+ export ${e_v}="${!e_v} ( ${!v} )"
+ done
+
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index 8302dd3..f73b206 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -50,7 +50,7 @@ require()
local old_CURRENT_EXLIB="${CURRENT_EXLIB}"
export CURRENT_EXLIB="${e}"
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
local ${c_v}="${!v}"
local ${u_v}="${!v-unset}"
@@ -66,7 +66,12 @@ require()
export ${e_v}="${!e_v} ${!v}"
done
- for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ; do
+ for v in ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
+ local e_v="E_${v}"
+ export ${e_v}="${!e_v} ( ${!v} )"
+ done
+
+ for v in ${PALUDIS_SOURCE_MERGED_VARIABLES} ${PALUDIS_BRACKET_MERGED_VARIABLES} ; do
local c_v="current_${v}" u_v="unset_${v}"
[[ "unset" == ${!u_v} ]] && unset ${v} || export ${v}="${!c_v}"
done