示例#1
0
 def post_build(cls, spec, emerge_config):
     """
     Execute Portage post-build tasks.
     """
     emerge_settings, emerge_trees, mtimedb = emerge_config
     if "yes" == emerge_settings.get("AUTOCLEAN"):
         print_info("executing post-build operations, please wait...")
         build_args = list(cls._setup_build_args(spec))
         _action, opts, _files = parse_opts(build_args)
         unmerge(emerge_trees[emerge_settings["ROOT"]]["root_config"],
             opts, "clean", [], mtimedb["ldpath"], autoclean=1)
	def _start(self):
		try:
			retval = unmerge(self.pkg.root_config, self.opts, "unmerge",
				[self.pkg.cpv], self.ldpath_mtimes, clean_world=0,
				clean_delay=0, raise_on_error=1, scheduler=self.scheduler,
				writemsg_level=self._writemsg_level)
		except UninstallFailure as e:
			self.returncode = e.status
		else:
			self.returncode = os.EX_OK

		if retval == 1:
			self.world_atom(self.pkg)

		self.wait()