aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-02-15 18:59:42 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2009-02-15 22:06:17 +0000
commit5493e9054fde96b36eae7927adeaa1a2f93b10e6 (patch)
tree7ae4c24f4f3cf4ffc1ce9ec7b5ac5e024fe65b40
parentfa3f1d98c374fd02fecbd9813d68261dd456119d (diff)
downloadpaludis-5493e9054fde96b36eae7927adeaa1a2f93b10e6.tar.gz
paludis-5493e9054fde96b36eae7927adeaa1a2f93b10e6.tar.xz
Shuffle around the ${builddir}/${cat}-${pkg}-${ver} logic a bit
Leave builtin_*rm alone, so as not to break the upgrade path.
-rw-r--r--paludis/repositories/e/e_installed_repository.cc2
-rw-r--r--paludis/repositories/e/eapis/0.conf2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf2
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf2
-rw-r--r--paludis/repositories/e/ebuild.cc6
-rw-r--r--paludis/repositories/e/ebuild.hh2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_init.bash12
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_initmisc.bash8
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_killold.bash8
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash8
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_tidyup.bash18
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash15
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_init.bash12
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash8
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash8
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash6
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash18
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash15
-rw-r--r--paludis/repositories/e/ebuild_entries.cc23
-rw-r--r--paludis/repositories/e/ebuild_id.cc1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc1
-rw-r--r--paludis/repositories/e/vdb_repository.cc1
22 files changed, 107 insertions, 71 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 16ec3ef..4c022d1 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -280,6 +280,7 @@ EInstalledRepository::perform_config(
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-config")),
value_for<n::package_id>(id),
value_for<n::portdir>(ver_dir),
value_for<n::sandbox>(phase->option("sandbox")),
@@ -384,6 +385,7 @@ EInstalledRepository::perform_info(
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info")),
value_for<n::package_id>(id),
value_for<n::portdir>(ver_dir),
value_for<n::sandbox>(phase->option("sandbox")),
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 103bf1e..f84ad27 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -47,7 +47,7 @@ binary_from_env_variables = \
non_empty_variables = \
P PV PR PN PVR PF CATEGORY build:FILESDIR build:ECLASSDIR build:PORTDIR \
build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
- build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+ build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT PALUDIS_PACKAGE_BUILDDIR
directory_variables = \
build:ECLASSDIR build:PORTDIR build:DISTDIR
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index e71229f..7704989 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -51,7 +51,7 @@ binary_from_env_variables = \
non_empty_variables = \
PNV PV PR PN PVR PNVR CATEGORY build:FILES build:EXLIBSDIRS build:FETCHEDDIR build:REPODIR \
PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
- PALUDIS_COMMAND ROOT
+ PALUDIS_COMMAND ROOT PALUDIS_PACKAGE_BUILDDIR
directory_variables = \
build:FETCHEDDIR build:REPODIR
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index dbf298f..2a8464e 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -48,7 +48,7 @@ binary_from_env_variables = \
non_empty_variables = \
P PV PR PN PVR PF CATEGORY build:FILESDIR build:ECLASSDIR build:PORTDIR \
build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
- build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+ build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT PALUDIS_PACKAGE_BUILDDIR
directory_variables = \
build:ECLASSDIR build:PORTDIR build:DISTDIR
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 5ae5627..0809fa4 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -139,6 +139,7 @@ EbuildCommand::operator() ()
(std::string(PALUDIS_GIT_HEAD).empty() ?
std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD)))
.with_setenv("PALUDIS_TMPDIR", stringify(params.builddir()))
+ .with_setenv("PALUDIS_PACKAGE_BUILDDIR", stringify(params.package_builddir()))
.with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/")
.with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "))
.with_setenv("PALUDIS_HOOK_DIRS", join(hook_dirs->begin(), hook_dirs->end(), " "))
@@ -272,10 +273,7 @@ EbuildCommand::add_portage_vars(const Command & cmd) const
return Command(cmd)
.with_setenv("PORTAGE_ACTUAL_DISTDIR", stringify(params.distdir()))
.with_setenv("PORTAGE_BASHRC", "/dev/null")
- .with_setenv("PORTAGE_BUILDDIR", stringify(params.builddir()) + "/" +
- stringify(params.package_id()->name().category()) + "-" +
- stringify(params.package_id()->name().package()) + "-" +
- stringify(params.package_id()->version()))
+ .with_setenv("PORTAGE_BUILDDIR", stringify(params.package_builddir()))
.with_setenv("PORTAGE_CALLER", params.environment()->paludis_command())
.with_setenv("PORTAGE_GID", "0")
.with_setenv("PORTAGE_INST_GID", "0")
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index fbd7637..fa92abf 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -68,6 +68,7 @@ namespace paludis
struct maybe_output_manager;
struct merger_options;
struct output_directory;
+ struct package_builddir;
struct package_id;
struct portdir;
struct profiles;
@@ -107,6 +108,7 @@ namespace paludis
NamedValue<n::exlibsdirs, std::tr1::shared_ptr<const FSEntrySequence> > exlibsdirs;
NamedValue<n::files_dir, FSEntry> files_dir;
NamedValue<n::maybe_output_manager, std::tr1::shared_ptr<OutputManager> > maybe_output_manager;
+ NamedValue<n::package_builddir, FSEntry> package_builddir;
NamedValue<n::package_id, std::tr1::shared_ptr<const erepository::ERepositoryID> > package_id;
NamedValue<n::portdir, FSEntry> portdir;
NamedValue<n::sandbox, bool> sandbox;
diff --git a/paludis/repositories/e/ebuild/0/builtin_init.bash b/paludis/repositories/e/ebuild/0/builtin_init.bash
index 3e33b0a..3f62989 100644
--- a/paludis/repositories/e/ebuild/0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_init.bash
@@ -52,24 +52,24 @@ builtin_init()
fi
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
- export WORKDIR="${PALUDIS_TMPDIR}/${CATEGORY}-${PF}/work"
+ export WORKDIR="${PALUDIS_PACKAGE_BUILDDIR}/work"
mkdir -p "${WORKDIR}" || die "Couldn't create \$WORKDIR (\"${WORKDIR}\")"
declare -r WORKDIR="${WORKDIR}"
- export T="${PALUDIS_TMPDIR}/${CATEGORY}-${PF}/temp/"
+ export T="${PALUDIS_PACKAGE_BUILDDIR}/temp/"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
declare -r T="${T}"
export HOME="${T}"
export TMPDIR="${T}"
- export D="${PALUDIS_TMPDIR}/${CATEGORY}-${PF}/image/"
+ export D="${PALUDIS_PACKAGE_BUILDDIR}/image/"
export D="${D//+(\/)//}"
mkdir -p "${D}" || die "Couldn't create \$D (\"${D}\")"
declare -r D="${D}"
diff --git a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
index 4c56042..720816a 100644
--- a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
@@ -52,14 +52,14 @@ builtin_initmisc()
fi
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
- export T="${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc/temp/"
+ export T="${PALUDIS_PACKAGE_BUILDDIR}"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
declare -r T="${T}"
export HOME="${T}"
diff --git a/paludis/repositories/e/ebuild/0/builtin_killold.bash b/paludis/repositories/e/ebuild/0/builtin_killold.bash
index a528a3a..3c27522 100644
--- a/paludis/repositories/e/ebuild/0/builtin_killold.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_killold.bash
@@ -19,15 +19,15 @@
builtin_killold()
{
local a
- for a in PF CATEGORY PALUDIS_TMPDIR ; do
+ for a in PALUDIS_PACKAGE_BUILDDIR ; do
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
}
diff --git a/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash b/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
index 4f48965..7f9e960 100644
--- a/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
@@ -19,15 +19,15 @@
builtin_killoldmisc()
{
local a
- for a in PF CATEGORY PALUDIS_TMPDIR ; do
+ for a in PALUDIS_PACKAGE_BUILDDIR ; do
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
}
diff --git a/paludis/repositories/e/ebuild/0/builtin_tidyup.bash b/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
index 1c52d54..42ebbf6 100644
--- a/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
@@ -18,13 +18,21 @@
builtin_tidyup()
{
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" ]] ; then
+ if [[ -z ${PALUDIS_PACKAGE_BUILDDIR} ]]; then
+ local a
+ for a in PALUDIS_TMPDIR CATEGORY PF ; do
+ [[ -z "${!a}" ]] && die "\$${a} unset or empty"
+ done
+ PALUDIS_PACKAGE_BUILDDIR=${PALUDIS_TMPDIR}/${CATEGORY}-${PF}
+ fi
+
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- echo chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" 1>&2
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove flags from workdir"
+ echo chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- echo rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" 1>&2
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}" || die "Couldn't remove work"
+ echo rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove work"
fi
}
diff --git a/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash b/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
index 8d83ee3..934542d 100644
--- a/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
@@ -18,13 +18,18 @@
builtin_tidyupmisc()
{
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" ]] ; then
+ local a
+ for a in PALUDIS_PACKAGE_BUILDDIR ; do
+ [[ -z "${!a}" ]] && die "\$${a} unset or empty"
+ done
+
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- echo chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" 1>&2
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove flags from workdir"
+ echo chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- echo rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" 1>&2
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PF}-misc" || die "Couldn't remove work"
+ echo rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove work"
fi
}
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
index 6f50c5e..45126e7 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
@@ -52,24 +52,24 @@ builtin_init()
fi
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
- export WORKBASE="${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}/work"
+ export WORKBASE="${PALUDIS_PACKAGE_BUILDDIR}/work"
mkdir -p "${WORKBASE}" || die "Couldn't create \$WORKBASE (\"${WORKBASE}\")"
declare -r WORKBASE="${WORKBASE}"
- export TEMP="${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}/temp/"
+ export TEMP="${PALUDIS_PACKAGE_BUILDDIR}/temp/"
mkdir -p "${TEMP}" || die "Couldn't create \$TEMP (\"${TEMP}\")"
declare -r TEMP="${TEMP}"
export HOME="${TEMP}"
export TMPDIR="${TEMP}"
- export IMAGE="${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}/image/"
+ export IMAGE="${PALUDIS_PACKAGE_BUILDDIR}/image/"
export IMAGE="${IMAGE//+(\/)//}"
mkdir -p "${IMAGE}" || die "Couldn't create \$IMAGE (\"${IMAGE}\")"
declare -r IMAGE="${IMAGE}"
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
index 2555f6b..17ba0e1 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
@@ -52,14 +52,14 @@ builtin_initmisc()
fi
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
- export TEMP="${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc/temp/"
+ export TEMP="${PALUDIS_PACKAGE_BUILDDIR}/temp/"
mkdir -p "${TEMP}" || die "Couldn't create \$TEMP (\"${TEMP}\")"
declare -r TEMP="${TEMP}"
export HOME="${TEMP}"
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
index b1f5fb0..c25febc 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
@@ -19,15 +19,15 @@
builtin_killold()
{
local a
- for a in PNVR CATEGORY PALUDIS_TMPDIR ; do
+ for a in PALUDIS_PACKAGE_BUILDDIR ; do
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
}
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
index ccfe627..ad233e6 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
@@ -23,11 +23,11 @@ builtin_killoldmisc()
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
done
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" ]] ; then
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove flags from workdir"
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove previous work"
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove previous work"
fi
}
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
index f6409c9..6e483a7 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
@@ -18,13 +18,21 @@
builtin_tidyup()
{
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" ]] ; then
+ if [[ -z ${PALUDIS_PACKAGE_BUILDDIR} ]]; then
+ local a
+ for a in PALUDIS_TMPDIR CATEGORY PF ; do
+ [[ -z "${!a}" ]] && die "\$${a} unset or empty"
+ done
+ PALUDIS_PACKAGE_BUILDDIR=${PALUDIS_TMPDIR}/${CATEGORY}-${PF}
+ fi
+
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- echo chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" 1>&2
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove flags from workdir"
+ echo chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- echo rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" 1>&2
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}" || die "Couldn't remove work"
+ echo rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove work"
fi
}
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
index c69e473..ae7a620 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
@@ -18,13 +18,18 @@
builtin_tidyupmisc()
{
- if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" ]] ; then
+ local a
+ for a in PALUDIS_PACKAGE_BUILDDIR ; do
+ [[ -z "${!a}" ]] && die "\$${a} unset or empty"
+ done
+
+ if [[ -e "${PALUDIS_PACKAGE_BUILDDIR}" ]] ; then
if type -p chflags &>/dev/null; then
- echo chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" 1>&2
- chflags -R 0 "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove flags from workdir"
+ echo chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ chflags -R 0 "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove flags from workdir"
fi
- echo rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" 1>&2
- rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}-${PNVR}-misc" || die "Couldn't remove work"
+ echo rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" 1>&2
+ rm -fr "${PALUDIS_PACKAGE_BUILDDIR}" || die "Couldn't remove work"
fi
}
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index dc41052..3f9f681 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -474,6 +474,7 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-nofetch")),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
@@ -620,6 +621,9 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
check_userpriv(FSEntry(_imp->params.distdir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()) &&
check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment, id->eapi()->supported()->userpriv_cannot_use_root()));
+ FSEntry package_builddir(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
+ stringify(id->name().package()) + "-" + stringify(id->version())));
+
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_install());
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
@@ -664,10 +668,8 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
(*install_action.options.destination()).destination_interface()->merge(
make_named_values<MergeParams>(
- value_for<n::environment_file>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
- stringify(id->name().package()) + "-" + stringify(id->version())) / "temp" / "loadsaveenv"),
- value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
- stringify(id->name().package()) + "-" + stringify(id->version())) / "image"),
+ value_for<n::environment_file>(package_builddir / "temp" / "loadsaveenv"),
+ value_for<n::image_dir>(package_builddir / "image"),
value_for<n::options>(id->eapi()->supported()->merger_options()),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
@@ -696,10 +698,8 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
ELikeSplitChoiceValue::canonical_name_with_prefix()));
EStripper stripper(make_named_values<EStripperOptions>(
- value_for<n::debug_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
- stringify(id->name().package()) + "-" + stringify(id->version())) / "image" / "usr" / libdir / "debug"),
- value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
- stringify(id->name().package()) + "-" + stringify(id->version())) / "image"),
+ value_for<n::debug_dir>(package_builddir / "image" / "usr" / libdir / "debug"),
+ value_for<n::image_dir>(package_builddir / "image"),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
value_for<n::split>(split_choice && split_choice->enabled()),
@@ -744,6 +744,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(package_builddir),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
@@ -759,7 +760,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::config_protect>(_imp->e_repository->profile_variable("CONFIG_PROTECT")),
value_for<n::config_protect_mask>(_imp->e_repository->profile_variable("CONFIG_PROTECT_MASK")),
value_for<n::expand_vars>(expand_vars),
- value_for<n::loadsaveenv_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version())) / "temp"),
+ value_for<n::loadsaveenv_dir>(package_builddir / "temp"),
value_for<n::profiles>(_imp->params.profiles()),
value_for<n::root>(install_action.options.destination()->installed_root_key() ?
stringify(install_action.options.destination()->installed_root_key()->value()) :
@@ -832,6 +833,7 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-info")),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
@@ -901,6 +903,7 @@ EbuildEntries::get_environment_variable(
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(make_null_shared_ptr()),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-variable")),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
@@ -1053,6 +1056,7 @@ EbuildEntries::pretend(
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-bad_options")),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
@@ -1104,6 +1108,7 @@ EbuildEntries::pretend(
value_for<n::exlibsdirs>(exlibsdirs),
value_for<n::files_dir>(_imp->e_repository->layout()->package_directory(id->name()) / "files"),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-pretend")),
value_for<n::package_id>(id),
value_for<n::portdir>(
(_imp->params.master_repositories() && ! _imp->params.master_repositories()->empty()) ?
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 16cb3fb..2fda637 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -244,6 +244,7 @@ EbuildID::need_keys_added() const
value_for<n::exlibsdirs>(_imp->repository->layout()->exlibsdirs(name())),
value_for<n::files_dir>(_imp->repository->layout()->package_directory(name()) / "files"),
value_for<n::maybe_output_manager>(make_null_shared_ptr()),
+ value_for<n::package_builddir>(_imp->repository->params().builddir() / (stringify(name().category()) + "-" + stringify(name().package()) + "-" + stringify(version()) + "-metadata")),
value_for<n::package_id>(shared_from_this()),
value_for<n::portdir>(
(_imp->repository->params().master_repositories() && ! _imp->repository->params().master_repositories()->empty()) ?
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index f76d413..67821f8 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -531,6 +531,7 @@ ExndbamRepository::perform_uninstall(
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(ver_dir),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-uninstall")),
value_for<n::package_id>(id),
value_for<n::portdir>(_imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index e500317..3b71e3c 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -461,6 +461,7 @@ VDBRepository::perform_uninstall(
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
value_for<n::files_dir>(pkg_dir),
value_for<n::maybe_output_manager>(output_manager),
+ value_for<n::package_builddir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version()) + "-uninstall")),
value_for<n::package_id>(id),
value_for<n::portdir>(_imp->params.location()),
value_for<n::sandbox>(phase->option("sandbox")),