summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-13 11:22:03 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-13 11:22:03 +0000
commit011be2c316ae87fa02efaffc14b05663cb989848 (patch)
treee1fdd0b5cb6e3ad331f40c5f12fda5381c8e068c /bin
parent22ef57b746e33b2d10601f7a8ad497c488469369 (diff)
downloadportage-011be2c316ae87fa02efaffc14b05663cb989848.tar.gz
portage-011be2c316ae87fa02efaffc14b05663cb989848.tar.bz2
portage-011be2c316ae87fa02efaffc14b05663cb989848.zip
tweak marking of D as readonly since we need to play around with it in pkg_preinst
svn path=/main/trunk/; revision=2302
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index be4486182..8b0d5e9ba 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1236,7 +1236,8 @@ dyn_preinst() {
[ "$(type -t pre_pkg_preinst)" == "function" ] && pre_pkg_preinst
- D=${IMAGE} pkg_preinst
+ declare -r D=${IMAGE}
+ pkg_preinst
# hopefully this will someday allow us to get rid of the no* feature flags
# we don't want globbing for initial expansion, but afterwards, we do
@@ -1765,9 +1766,11 @@ export S=${WORKDIR}/${P}
unset E_IUSE E_DEPEND E_RDEPEND E_CDEPEND E_PDEPEND
-for x in T P PN PV PVR PR A D EBUILD EMERGE_FROM O PPID FILESDIR PORTAGE_TMPDIR; do
+for x in T P PN PV PVR PR A EBUILD EMERGE_FROM O PPID FILESDIR PORTAGE_TMPDIR; do
[[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
done
+# Need to be able to change D in dyn_preinst due to the IMAGE stuff
+[[ $* != "preinst" ]] && declare -r D
unset x
# Turn of extended glob matching so that g++ doesn't get incorrectly matched.