aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-07 22:29:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-07 22:29:21 +0000
commitdee313d6fb86aa2ea411bdc1514f3e821dda846e (patch)
tree7590b97add1494f57ae91dc0ce999fdd3f3b7851
parent43ca76277d33de90905e61e63dc91ad10aa4ff64 (diff)
downloadpaludis-dee313d6fb86aa2ea411bdc1514f3e821dda846e.tar.gz
paludis-dee313d6fb86aa2ea411bdc1514f3e821dda846e.tar.xz
Be less sensitive to tinkering when -E portage
-rw-r--r--paludis/environments/portage/bashrc5
-rw-r--r--paludis/environments/portage/portage_environment.cc2
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash7
3 files changed, 8 insertions, 6 deletions
diff --git a/paludis/environments/portage/bashrc b/paludis/environments/portage/bashrc
index 6a30c3f..381bb0b 100644
--- a/paludis/environments/portage/bashrc
+++ b/paludis/environments/portage/bashrc
@@ -1,7 +1,6 @@
#!/bin/bash
# ebuild.bash doesn't allow USE etc to be set in user settings. But we need
-# to source make.conf to pick up things like CFLAGS. So... After sourcing
-# make.conf, unset things that ebuild.bash disallows.
-unset ${save_vars}
+# to source make.conf to pick up things like CFLAGS.
+unset check_save_vars check_unmodifiable_vars
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 00a24a9..92264ed 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -627,9 +627,9 @@ tr1::shared_ptr<const FSEntrySequence>
PortageEnvironment::bashrc_files() const
{
tr1::shared_ptr<FSEntrySequence> result(new FSEntrySequence);
+ result->push_back(FSEntry(LIBEXECDIR) / "paludis" / "environments" / "portage" / "bashrc");
result->push_back(_imp->conf_dir / "make.globals");
result->push_back(_imp->conf_dir / "make.conf");
- result->push_back(FSEntry(LIBEXECDIR) / "paludis" / "environments" / "portage" / "bashrc");
return result;
}
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index eb75950..d50e10a 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -132,6 +132,9 @@ export CONFIG_PROTECT_MASK="${PALUDIS_CONFIG_PROTECT_MASK}"
save_vars="$(eval echo ${PALUDIS_SAVE_VARIABLES} )"
save_base_vars="$(eval echo ${PALUDIS_SAVE_BASE_VARIABLES} )"
save_unmodifiable_vars="$(eval echo ${PALUDIS_SAVE_UNMODIFIABLE_VARIABLES} )"
+check_save_vars="${save_vars}"
+check_base_vars="${save_base_vars}"
+check_unmodifiable_vars="${save_unmodifiable_vars}"
for var in ${save_vars} ${default_save_vars} ${save_base_vars} ${save_unmodifiable_vars} ; do
ebuild_notice "debug" "Saving ${var}=${!var}"
@@ -159,13 +162,13 @@ for f in ${PALUDIS_BASHRC_FILES} ; do
ebuild_notice "debug" "Skipping bashrc file ${f}"
fi
- for var in ${save_vars} ; do
+ for var in ${check_save_vars} ; do
if [[ -n ${!var} ]] ; then
die "${f} attempted to set \$${var}, which must not be set in bashrc."
fi
done
- for var in ${save_unmodifiable_vars} ; do
+ for var in ${check_save_unmodifiable_vars} ; do
s_var=save_var_${var}
if [[ "${!s_var}" != "${!var}" ]] ; then
die "${f} attempted to modify \$${var}, which must not be modified in bashrc."