summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-02-13 17:15:58 +0000
committerUlrich Müller <ulm@gentoo.org>2009-02-13 17:15:58 +0000
commite373ec7d6c81f4bef2e1b0c6f85d7642dd5e205f (patch)
treeb3aa7f62e347ac98e2eb06b45177b72a634c4942 /eclass
parentUpdate USE flags to require xml from python; bug #233166 (diff)
downloadhistorical-e373ec7d6c81f4bef2e1b0c6f85d7642dd5e205f.tar.gz
historical-e373ec7d6c81f4bef2e1b0c6f85d7642dd5e205f.tar.bz2
historical-e373ec7d6c81f4bef2e1b0c6f85d7642dd5e205f.zip
Remove workaround for T; Paludis bug #517 was fixed 12 months ago.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/elisp-common.eclass27
1 files changed, 15 insertions, 12 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 37abd44475c0..cebafd2e9d9d 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.54 2009/01/31 21:31:42 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.55 2009/02/13 17:15:58 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -313,19 +313,22 @@ elisp-site-file-install() {
elisp-site-regen() {
local i sf line firstrun obsolete
local -a sflist
- # Work around Paludis borkage: variable T is empty in pkg_postrm
- local tmpdir=${T:-$(mktemp -d)}
if [ ! -d "${ROOT}${SITELISP}" ]; then
eerror "elisp-site-regen: Directory ${SITELISP} does not exist"
return 1
fi
+ if [ ! -d "${T}" ]; then
+ eerror "elisp-site-regen: Temporary directory ${T} does not exist"
+ return 1
+ fi
+
[ -e "${ROOT}${SITELISP}"/site-gentoo.el ] || firstrun=t
if [ "${firstrun}" ] && [ ! -e "${ROOT}${SITELISP}"/site-start.el ]; then
einfo "Creating default ${SITELISP}/site-start.el ..."
- cat <<-EOF >"${tmpdir}"/site-start.el
+ cat <<-EOF >"${T}"/site-start.el
;;; site-start.el
;;; Commentary:
@@ -366,7 +369,7 @@ elisp-site-regen() {
eval "${old_shopts}"
- cat <<-EOF >"${tmpdir}"/site-gentoo.el
+ cat <<-EOF >"${T}"/site-gentoo.el
;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
;;; Commentary:
@@ -376,8 +379,8 @@ elisp-site-regen() {
;;; Code:
EOF
# Use sed instead of cat here, since files may miss a trailing newline.
- sed '$q' "${sflist[@]}" </dev/null >>"${tmpdir}"/site-gentoo.el
- cat <<-EOF >>"${tmpdir}"/site-gentoo.el
+ sed '$q' "${sflist[@]}" </dev/null >>"${T}"/site-gentoo.el
+ cat <<-EOF >>"${T}"/site-gentoo.el
(provide 'site-gentoo)
@@ -387,17 +390,17 @@ elisp-site-regen() {
;;; site-gentoo.el ends here
EOF
- if cmp -s "${ROOT}${SITELISP}"/site-gentoo.el "${tmpdir}"/site-gentoo.el
+ if cmp -s "${ROOT}${SITELISP}"/site-gentoo.el "${T}"/site-gentoo.el
then
# This prevents outputting unnecessary text when there
# was actually no change.
# A case is a remerge where we have doubled output.
echo " no changes."
else
- mv "${tmpdir}"/site-gentoo.el "${ROOT}${SITELISP}"/site-gentoo.el
- [ -f "${tmpdir}"/site-start.el ] \
+ mv "${T}"/site-gentoo.el "${ROOT}${SITELISP}"/site-gentoo.el
+ [ -f "${T}"/site-start.el ] \
&& [ ! -e "${ROOT}${SITELISP}"/site-start.el ] \
- && mv "${tmpdir}"/site-start.el "${ROOT}${SITELISP}"/site-start.el
+ && mv "${T}"/site-start.el "${ROOT}${SITELISP}"/site-start.el
echo
einfo "... ${#sflist[@]} site initialisation file(s) included."
fi
@@ -434,7 +437,7 @@ elisp-site-regen() {
fi
# cleanup
- rm -f "${tmpdir}"/site-{gentoo,start}.el
+ rm -f "${T}"/site-{gentoo,start}.el
return 0
}