aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash')
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash18
1 files changed, 13 insertions, 5 deletions
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
}