summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-26 06:55:19 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-26 06:55:19 +0000
commit2e9a0f896139530fbcea99f3987f49fc94dbdea6 (patch)
treef69e1ae591bfd3d97339dcc587d4f427bc0c37e4
parent85e3299b684ca9e25c7e0e7c25981a7e255c42f0 (diff)
downloadportage-2e9a0f896139530fbcea99f3987f49fc94dbdea6.tar.gz
portage-2e9a0f896139530fbcea99f3987f49fc94dbdea6.tar.bz2
portage-2e9a0f896139530fbcea99f3987f49fc94dbdea6.zip
rename BUILDDIR to PORTAGE_BUILDDIR
svn path=/main/trunk/; revision=2475
-rwxr-xr-xbin/ebuild.sh80
-rw-r--r--pym/portage.py24
2 files changed, 52 insertions, 52 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 5ea8f92a6..f4f1fe02d 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -640,7 +640,7 @@ dyn_unpack() {
echo ">>> ${EBUILD} has been updated; recreating WORKDIR..."
newstuff="yes"
rm -rf "${WORKDIR}"
- elif [ ! -f "${BUILDDIR}/.unpacked" ]; then
+ elif [ ! -f "${PORTAGE_BUILDDIR}/.unpacked" ]; then
echo ">>> Not marked as unpacked; recreating WORKDIR..."
newstuff="yes"
rm -rf "${WORKDIR}"
@@ -658,9 +658,9 @@ dyn_unpack() {
[ -d "$WORKDIR" ] && cd "${WORKDIR}"
echo ">>> Unpacking source..."
src_unpack
- touch "${BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in BUILDIR"
+ touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in BUILDIR"
echo ">>> Source unpacked."
- cd "$BUILDDIR"
+ cd "${PORTAGE_BUILDDIR}"
[ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack
@@ -670,14 +670,14 @@ dyn_unpack() {
dyn_clean() {
if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
- "${BUILDDIR}"
+ "${PORTAGE_BUILDDIR}"
fi
if [ "$USERLAND" == "Darwin" ] && type -p chflags &>/dev/null; then
- chflags -R noschg,nouchg,nosappnd,nouappnd "${BUILDDIR}"
+ chflags -R noschg,nouchg,nosappnd,nouappnd "${PORTAGE_BUILDDIR}"
fi
- rm -rf "${BUILDDIR}/image"
+ rm -rf "${PORTAGE_BUILDDIR}/image"
if ! hasq keeptemp $FEATURES; then
rm -rf "${T}"
@@ -686,25 +686,25 @@ dyn_clean() {
fi
if ! hasq keepwork $FEATURES; then
- rm -rf "${BUILDDIR}/.unpacked"
- rm -rf "${BUILDDIR}/.compiled"
- rm -rf "${BUILDDIR}/.tested"
- rm -rf "${BUILDDIR}/.installed"
- rm -rf "${BUILDDIR}/.packaged"
- rm -rf "${BUILDDIR}/build-info"
+ rm -rf "${PORTAGE_BUILDDIR}/.unpacked"
+ rm -rf "${PORTAGE_BUILDDIR}/.compiled"
+ rm -rf "${PORTAGE_BUILDDIR}/.tested"
+ rm -rf "${PORTAGE_BUILDDIR}/.installed"
+ rm -rf "${PORTAGE_BUILDDIR}/.packaged"
+ rm -rf "${PORTAGE_BUILDDIR}/build-info"
rm -rf "${WORKDIR}"
fi
- if [ -f "${BUILDDIR}/.unpacked" ]; then
- find "${BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir &>/dev/null
+ if [ -f "${PORTAGE_BUILDDIR}/.unpacked" ]; then
+ find "${PORTAGE_BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir &>/dev/null
fi
- if [ -z "$(find "${BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then
- rmdir "${BUILDDIR}"
+ if [ -z "$(find "${PORTAGE_BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then
+ rmdir "${PORTAGE_BUILDDIR}"
fi
# do not bind this to doebuild defined DISTDIR; don't trust doebuild, and if mistakes are made it'll
# result in it wiping the users distfiles directory (bad).
- rm -rf "${BUILDDIR}/distdir"
+ rm -rf "${PORTAGE_BUILDDIR}/distdir"
true
}
@@ -816,33 +816,33 @@ abort_handler() {
abort_compile() {
abort_handler "src_compile" $1
- rm -f "${BUILDDIR}/.compiled"
+ rm -f "${PORTAGE_BUILDDIR}/.compiled"
exit 1
}
abort_unpack() {
abort_handler "src_unpack" $1
- rm -f "${BUILDDIR}/.unpacked"
- rm -rf "${BUILDDIR}/work"
+ rm -f "${PORTAGE_BUILDDIR}/.unpacked"
+ rm -rf "${PORTAGE_BUILDDIR}/work"
exit 1
}
abort_package() {
abort_handler "dyn_package" $1
- rm -f "${BUILDDIR}/.packaged"
+ rm -f "${PORTAGE_BUILDDIR}/.packaged"
rm -f "${PKGDIR}"/All/${PF}.t*
exit 1
}
abort_test() {
abort_handler "dyn_test" $1
- rm -f "${BUILDDIR}/.tested"
+ rm -f "${PORTAGE_BUILDDIR}/.tested"
exit 1
}
abort_install() {
abort_handler "src_install" $1
- rm -rf "${BUILDDIR}/image"
+ rm -rf "${PORTAGE_BUILDDIR}/image"
exit 1
}
@@ -864,7 +864,7 @@ dyn_compile() {
[ "${DISTCC_DIR-unset}" == "unset" ] && export DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"
[ ! -z "${DISTCC_DIR}" ] && addwrite "${DISTCC_DIR}"
- if hasq noauto $FEATURES &>/dev/null && [ ! -f ${BUILDDIR}/.unpacked ]; then
+ if hasq noauto $FEATURES &>/dev/null && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then
echo
echo "!!! We apparently haven't unpacked... This is probably not what you"
echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume"
@@ -879,14 +879,14 @@ dyn_compile() {
sleep 3
fi
- local srcdir=${BUILDDIR}
- cd "${BUILDDIR}"
+ local srcdir=${PORTAGE_BUILDDIR}
+ cd "${PORTAGE_BUILDDIR}"
if [ ! -e "build-info" ]; then
mkdir build-info
fi
cp "${EBUILD}" "build-info/${PF}.ebuild"
- if [ ${BUILDDIR}/.compiled -nt "${WORKDIR}" ]; then
+ if [ ${PORTAGE_BUILDDIR}/.compiled -nt "${WORKDIR}" ]; then
echo ">>> It appears that ${PN} is already compiled; skipping."
echo ">>> (clean to force compilation)"
trap SIGINT SIGQUIT
@@ -907,7 +907,7 @@ dyn_compile() {
src_compile
echo ">>> Source compiled."
#|| abort_compile "fail"
- cd "${BUILDDIR}"
+ cd "${PORTAGE_BUILDDIR}"
touch .compiled
cd build-info
@@ -935,7 +935,7 @@ dyn_compile() {
dyn_package() {
trap "abort_package" SIGINT SIGQUIT
- cd "${BUILDDIR}/image"
+ cd "${PORTAGE_BUILDDIR}/image"
tar cpvf - ./ | bzip2 -f > ../bin.tar.bz2 || die "Failed to create tarball"
cd ..
xpak build-info inf.xpak
@@ -947,15 +947,15 @@ dyn_package() {
fi
ln -sf "../All/${PF}.tbz2" "${PKGDIR}/${CATEGORY}/${PF}.tbz2" || die "Failed to create symlink in ${PKGDIR}/${CATEGORY}"
echo ">>> Done."
- cd "${BUILDDIR}"
- touch .packaged || die "Failed to 'touch .packaged' in ${BUILDDIR}"
+ cd "${PORTAGE_BUILDDIR}"
+ touch .packaged || die "Failed to 'touch .packaged' in ${PORTAGE_BUILDDIR}"
trap SIGINT SIGQUIT
}
dyn_test() {
[ "$(type -t pre_src_test)" == "function" ] && pre_src_test
- if [ ${BUILDDIR}/.tested -nt "${WORKDIR}" ]; then
+ if [ ${PORTAGE_BUILDDIR}/.tested -nt "${WORKDIR}" ]; then
echo ">>> It appears that ${PN} has already been tested; skipping."
[ "$(type -t post_src_test)" == "function" ] && post_src_test
return
@@ -973,8 +973,8 @@ dyn_test() {
src_test
fi
- cd "${BUILDDIR}"
- touch .tested || die "Failed to 'touch .tested' in ${BUILDDIR}"
+ cd "${PORTAGE_BUILDDIR}"
+ touch .tested || die "Failed to 'touch .tested' in ${PORTAGE_BUILDDIR}"
[ "$(type -t post_src_test)" == "function" ] && post_src_test
trap SIGINT SIGQUIT
}
@@ -986,8 +986,8 @@ PORTAGE_INST_GID="0"
dyn_install() {
trap "abort_install" SIGINT SIGQUIT
[ "$(type -t pre_src_install)" == "function" ] && pre_src_install
- rm -rf "${BUILDDIR}/image"
- mkdir "${BUILDDIR}/image"
+ rm -rf "${PORTAGE_BUILDDIR}/image"
+ mkdir "${PORTAGE_BUILDDIR}/image"
if [ -d "${S}" ]; then
cd "${S}"
fi
@@ -1033,7 +1033,7 @@ dyn_install() {
# Don't want paths that point to the tree where the package was built
# (older, broken libtools would do this). Also check for null paths
# because the loader will search $PWD when it finds null paths.
- f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${BUILDDIR}|: |::|^ )")
+ f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^ )")
if [[ -n ${f} ]] ; then
echo -ne '\a\n'
echo "QA Notice: the following files contain insecure RUNPATH's"
@@ -1088,7 +1088,7 @@ dyn_install() {
fi
# Save NEEDED information
- scanelf -qyRF '%p %n' "${D}" | sed -e 's:^:/:' > "${BUILDDIR}"/build-info/NEEDED
+ scanelf -qyRF '%p %n' "${D}" | sed -e 's:^:/:' > "${PORTAGE_BUILDDIR}"/build-info/NEEDED
if [[ ${qa_sucks_for_sure} -eq 1 ]] ; then
die "Aborting due to serious QA concerns"
@@ -1189,10 +1189,10 @@ dyn_install() {
done
fi
- touch "${BUILDDIR}/.installed"
+ touch "${PORTAGE_BUILDDIR}/.installed"
echo ">>> Completed installing ${PF} into ${D}"
echo
- cd ${BUILDDIR}
+ cd ${PORTAGE_BUILDDIR}
[ "$(type -t post_src_install)" == "function" ] && post_src_install
trap SIGINT SIGQUIT
}
diff --git a/pym/portage.py b/pym/portage.py
index 0711a9472..c78a676d4 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2526,7 +2526,7 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
mysettings["BUILD_PREFIX"] = mysettings["PORTAGE_TMPDIR"]+"/portage"
mysettings["HOME"] = mysettings["BUILD_PREFIX"]+"/homedir"
mysettings["PKG_TMPDIR"] = mysettings["PORTAGE_TMPDIR"]+"/portage-pkg"
- mysettings["BUILDDIR"] = mysettings["BUILD_PREFIX"]+"/"+mysettings["PF"]
+ mysettings["PORTAGE_BUILDDIR"] = mysettings["BUILD_PREFIX"]+"/"+mysettings["PF"]
mysettings["PORTAGE_BASHRC"] = EBUILD_SH_ENV_FILE
@@ -2571,7 +2571,7 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
# Should be ok again to set $T, as sandbox does not depend on it
# XXX Bug. no way in hell this is valid for clean handling.
- mysettings["T"]=mysettings["BUILDDIR"]+"/temp"
+ mysettings["T"]=mysettings["PORTAGE_BUILDDIR"]+"/temp"
if cleanup or mydo=="clean":
if os.path.exists(mysettings["T"]):
shutil.rmtree(mysettings["T"])
@@ -2612,10 +2612,10 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
os.makedirs(mysettings["BUILD_PREFIX"])
if (os.getuid() == 0):
os.chown(mysettings["BUILD_PREFIX"],portage_uid,portage_gid)
- if not os.path.exists(mysettings["BUILDDIR"]):
- os.makedirs(mysettings["BUILDDIR"])
+ if not os.path.exists(mysettings["PORTAGE_BUILDDIR"]):
+ os.makedirs(mysettings["PORTAGE_BUILDDIR"])
if (os.getuid() == 0):
- os.chown(mysettings["BUILDDIR"],portage_uid,portage_gid)
+ os.chown(mysettings["PORTAGE_BUILDDIR"],portage_uid,portage_gid)
except OSError, e:
print "!!! File system problem. (ReadOnly? Out of space?)"
print "!!! Perhaps: rm -Rf",mysettings["BUILD_PREFIX"]
@@ -2630,7 +2630,7 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
os.chmod(mysettings["HOME"],02770)
except OSError, e:
print "!!! File system problem. (ReadOnly? Out of space?)"
- print "!!! Failed to create fake home directory in BUILDDIR"
+ print "!!! Failed to create fake home directory in PORTAGE_BUILDDIR"
print "!!!",str(e)
return 1
@@ -2695,8 +2695,8 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
features.remove("distcc")
mysettings["DISTCC_DIR"]=""
- mysettings["WORKDIR"]=mysettings["BUILDDIR"]+"/work"
- mysettings["D"]=mysettings["BUILDDIR"]+"/image/"
+ mysettings["WORKDIR"]=mysettings["PORTAGE_BUILDDIR"]+"/work"
+ mysettings["D"]=mysettings["PORTAGE_BUILDDIR"]+"/image/"
if mysettings.has_key("PORT_LOGDIR"):
if not os.access(mysettings["PORT_LOGDIR"],os.F_OK):
@@ -2797,7 +2797,7 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
if (mydo not in ("setup", "clean", "postinst", "preinst", "prerm") and "noauto" not in features) or \
mydo == "unpack":
orig_distdir = mysettings["DISTDIR"]
- edpath = mysettings["DISTDIR"] = os.path.join(mysettings["BUILDDIR"], "distdir")
+ edpath = mysettings["DISTDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "distdir")
if os.path.exists(edpath):
try:
if os.path.isdir(edpath) and not os.path.islink(edpath):
@@ -2873,16 +2873,16 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
return spawnebuild(mydo,actionmap,mysettings,debug,logfile=logfile)
elif mydo=="qmerge":
#check to ensure install was run. this *only* pops up when users forget it and are using ebuild
- if not os.path.exists(mysettings["BUILDDIR"]+"/.installed"):
+ if not os.path.exists(mysettings["PORTAGE_BUILDDIR"]+"/.installed"):
print "!!! mydo=qmerge, but install phase hasn't been ran"
sys.exit(1)
#qmerge is specifically not supposed to do a runtime dep check
- return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"],mytree=tree)
+ return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["PORTAGE_BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"],mytree=tree)
elif mydo=="merge":
retval=spawnebuild("install",actionmap,mysettings,debug,alwaysdep=1,logfile=logfile)
if retval:
return retval
- return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"],mytree=tree)
+ return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["PORTAGE_BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"],mytree=tree)
else:
print "!!! Unknown mydo:",mydo
sys.exit(1)