summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-04 11:12:01 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-04 11:12:01 +0000
commitf71f67b12272b5a1f9b2d85fa56a449204317dee (patch)
tree177bce441023c59a216b8c29ff74a423c32a0d49
parentc50810507d606d3dd4363c8334905f7451631bec (diff)
downloadportage-f71f67b12272b5a1f9b2d85fa56a449204317dee.tar.gz
portage-f71f67b12272b5a1f9b2d85fa56a449204317dee.tar.bz2
portage-f71f67b12272b5a1f9b2d85fa56a449204317dee.zip
Split out a Scheduler._execute_pkg() method from _merge().
svn path=/main/trunk/; revision=10926
-rw-r--r--pym/_emerge/__init__.py44
1 files changed, 25 insertions, 19 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 07008d636..4a9fbd710 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -7504,31 +7504,13 @@ class Scheduler(object):
# blockers
continue
- if not pkg.installed:
- self._pkg_count.curval += 1
-
- merge = MergeListItem(args_set=self._args_set,
- binpkg_opts=self._binpkg_opts,
- build_opts=self._build_opts,
- emerge_opts=self.myopts,
- failed_fetches=self._failed_fetches,
- find_blockers=self._find_blockers(pkg), logger=self._logger,
- mtimedb=self._mtimedb, pkg=pkg, pkg_count=self._pkg_count,
- prefetcher=self._prefetchers.get(pkg),
- scheduler=self._sched_iface,
- settings=self.pkgsettings[pkg.root],
- world_atom=self._world_atom)
-
- retval = merge.execute()
+ retval = self._execute_pkg(pkg)
if retval != os.EX_OK:
if not self._build_opts.fetchonly:
return retval
- self.curval += 1
-
if pkg.installed:
- # There's nothing left to do for uninstall.
continue
self._restart_if_necessary(pkg)
@@ -7547,6 +7529,30 @@ class Scheduler(object):
self._task_queues.prefetch.clear()
return os.EX_OK
+ def _execute_pkg(self, pkg):
+
+ if not pkg.installed:
+ self._pkg_count.curval += 1
+
+ merge = MergeListItem(args_set=self._args_set,
+ binpkg_opts=self._binpkg_opts,
+ build_opts=self._build_opts,
+ emerge_opts=self.myopts,
+ failed_fetches=self._failed_fetches,
+ find_blockers=self._find_blockers(pkg), logger=self._logger,
+ mtimedb=self._mtimedb, pkg=pkg, pkg_count=self._pkg_count,
+ prefetcher=self._prefetchers.get(pkg),
+ scheduler=self._sched_iface,
+ settings=self.pkgsettings[pkg.root],
+ world_atom=self._world_atom)
+
+ retval = merge.execute()
+
+ if retval == os.EX_OK:
+ self.curval += 1
+
+ return retval
+
def _save_resume_list(self):
"""
Do this before verifying the ebuild Manifests since it might