aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
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 /paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
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.
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 f6409c9ec..6e483a757 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
}