unset BIN_PATH BIN BODY FUNC_SRC
fi
-if hasq ${EBUILD_PHASE} info prerm setup \
+if hasq ${EBUILD_PHASE} config info prerm setup \
&& [ ! -f "${T}/environment" ] ; then
bzip2 -dc "${EBUILD%/*}"/environment.bz2 > \
"${T}/environment" 2> /dev/null
print
ebuildpath = trees[settings["ROOT"]]["vartree"].dbapi.findname(pkg)
mysettings = portage.config(clone=settings)
- portage.doebuild(ebuildpath, "config", settings["ROOT"], mysettings,
+ vardb = trees[mysettings["ROOT"]]["vartree"].dbapi
+ debug = mysettings.get("PORTAGE_DEBUG") == "1"
+ retval = portage.doebuild(ebuildpath, "config", mysettings["ROOT"],
+ mysettings,
debug=(settings.get("PORTAGE_DEBUG", "") == 1), cleanup=True,
mydbapi=trees[settings["ROOT"]]["vartree"].dbapi, tree="vartree")
+ if retval == os.EX_OK:
+ portage.doebuild(ebuildpath, "clean", mysettings["ROOT"],
+ mysettings, debug=debug, mydbapi=vardb, tree="vartree")
print
def action_info(settings, trees, myopts, myfiles):