def execute(self):
root_config = self.pkg.root_config
portdb = root_config.trees["porttree"].dbapi
- vartree = root_config.trees["vartree"]
ebuild_path = portdb.findname(self.pkg.cpv)
debug = self.settings.get("PORTAGE_DEBUG") == "1"
+ retval = portage.doebuild(ebuild_path, "clean",
+ root_config.root, self.settings, debug, cleanup=1,
+ mydbapi=portdb, tree="porttree")
+ if retval != os.EX_OK:
+ return retval
+
retval = portage.doebuild(ebuild_path, "install",
- root_config.root, self.settings, debug, vartree=vartree,
+ root_config.root, self.settings, debug,
mydbapi=portdb, tree="porttree")
return retval
use_cache, mydbapi)
clean_phases = ("clean", "cleanrm")
- if mydo in clean_phases or \
- (not noauto and mydo in actionmap_deps and \
- mysettings.get("EMERGE_FROM") == "ebuild"):
- if mydo not in clean_phases:
- mysettings["EBUILD_PHASE"] = "clean"
- try:
- retval = spawn(_shell_quote(ebuild_sh_binary) + " clean",
- mysettings, debug=debug, free=1, logfile=None)
- finally:
- mysettings["EBUILD_PHASE"] = mydo
- if mydo in clean_phases or retval != os.EX_OK:
- return retval
+ if mydo in clean_phases:
+ retval = spawn(_shell_quote(ebuild_sh_binary) + " clean",
+ mysettings, debug=debug, free=1, logfile=None)
+ return retval
# get possible slot information from the deps file
if mydo == "depend":