aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-17 14:34:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-17 14:34:49 +0000
commit2b3f02e56f3031625531d638c0c704529e9939fc (patch)
treea2348a5aeb29a66eb0f56189b9821c31a839dee8
parent956c55fa1991fec28730850437a14014928a2121 (diff)
downloadpaludis-2b3f02e56f3031625531d638c0c704529e9939fc.tar.gz
paludis-2b3f02e56f3031625531d638c0c704529e9939fc.tar.xz
Make PALUDIS_HOME work for unmerge too. More verbose errors for default config.
-rw-r--r--ebuild/builtin_init.bash1
-rw-r--r--ebuild/builtin_init_bin.bash1
-rwxr-xr-xebuild/ebuild.bash3
-rw-r--r--paludis/default_config.cc5
4 files changed, 6 insertions, 4 deletions
diff --git a/ebuild/builtin_init.bash b/ebuild/builtin_init.bash
index 2a45eea..9e6a8fe 100644
--- a/ebuild/builtin_init.bash
+++ b/ebuild/builtin_init.bash
@@ -44,7 +44,6 @@ builtin_init()
export T="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/temp/"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
declare -r T="${T}"
- export PALUDIS_HOME="${HOME}"
export HOME="${T}"
export D="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/image/"
diff --git a/ebuild/builtin_init_bin.bash b/ebuild/builtin_init_bin.bash
index c8f7af7..be1600e 100644
--- a/ebuild/builtin_init_bin.bash
+++ b/ebuild/builtin_init_bin.bash
@@ -40,7 +40,6 @@ builtin_init_bin()
export T="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/temp/"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
declare -r T="${T}"
- export PALUDIS_HOME="${HOME}"
export HOME="${T}"
export D="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/image/"
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 669bb08..8e04a71 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -33,6 +33,8 @@ export SANDBOX_WRITE="${SANDBOX_WRITE}:${PALUDIS_TMPDIR}:/var/cache"
export SANDBOX_WRITE="${SANDBOX_WRITE}:/proc/self/attr:/selinux/context"
export SANDBOX_ON="1"
+export PALUDIS_HOME="${PALUDIS_HOME:-${HOME}}"
+
shopt -s expand_aliases
shopt -s extglob
@@ -163,6 +165,7 @@ ebuild_load_ebuild()
-e '/^\(declare \(-[^ ]\+ \)\?\)\?DISTDIR=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_EBUILD_DIR=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_COMMAND=/d' \
+ -e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_HOME=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?ROOT=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?SANDBOX/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?LD_/d' \
diff --git a/paludis/default_config.cc b/paludis/default_config.cc
index 4ca6796..1bdeb2f 100644
--- a/paludis/default_config.cc
+++ b/paludis/default_config.cc
@@ -135,11 +135,12 @@ DefaultConfig::DefaultConfig() :
config_suffix = "-" + _imp->config_suffix;
FSEntry config_dir(FSEntry(getenv_with_default("PALUDIS_HOME", getenv_or_error("HOME"))) /
- (".paludis" + config_suffix));
+ (".paludis" + config_suffix)), old_config_dir(config_dir);
if (! config_dir.exists())
config_dir = (FSEntry(SYSCONFDIR) / ("paludis" + config_suffix));
if (! config_dir.exists())
- throw DefaultConfigError("Can't find configuration directory");
+ throw DefaultConfigError("Can't find configuration directory (tried '"
+ + stringify(old_config_dir) + "', '" + stringify(config_dir) + "')");
Log::get_instance()->message(ll_debug, lc_no_context, "DefaultConfig initial directory is '"
+ stringify(config_dir) + "'");