diff options
-rw-r--r-- | pym/_emerge/__init__.py | 9 | ||||
-rw-r--r-- | pym/portage/__init__.py | 16 |
2 files changed, 11 insertions, 14 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index c88d8af8f..4929288f3 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1538,12 +1538,17 @@ class EbuildBuild(Task): 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 diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 6bdf03a78..9fd08e88e 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4934,18 +4934,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, 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": |