summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-07-20 21:21:22 +0000
committerZac Medico <zmedico@gentoo.org>2009-07-20 21:21:22 +0000
commitf3e60706d495fef6eaf366ef69d2b08b3a55db9b (patch)
tree34d012acf389f0b4b8cc51ba7d73fcf86cc18836
parent3020eb6852f91913b13ff7ad75f64d7d8914f973 (diff)
downloadportage-f3e60706d495fef6eaf366ef69d2b08b3a55db9b.tar.gz
portage-f3e60706d495fef6eaf366ef69d2b08b3a55db9b.tar.bz2
portage-f3e60706d495fef6eaf366ef69d2b08b3a55db9b.zip
Move mtimedb resume list code from action_build() to
Scheduler._save_resume_list(). svn path=/main/trunk/; revision=13841
-rw-r--r--pym/_emerge/Scheduler.py9
-rw-r--r--pym/_emerge/actions.py8
2 files changed, 9 insertions, 8 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 5eeb17e99..246ed2a71 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -1424,6 +1424,15 @@ class Scheduler(PollScheduler):
a non-essential package with a broken digest.
"""
mtimedb = self._mtimedb
+
+ mtimedb["resume"] = {}
+ # Stored as a dict starting with portage-2.1.6_rc1, and supported
+ # by >=portage-2.1.3_rc8. Versions <portage-2.1.3_rc8 only support
+ # a list type for options.
+ mtimedb["resume"]["myopts"] = self.myopts.copy()
+
+ # Convert Atom instances to plain str.
+ mtimedb["resume"]["favorites"] = [str(x) for x in self._favorites]
mtimedb["resume"]["mergelist"] = [list(x) \
for x in self._mergelist \
if isinstance(x, Package) and x.operation == "merge"]
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 0a48271c5..2d664ca80 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -452,14 +452,6 @@ def action_build(settings, trees, mtimedb,
mtimedb["resume_backup"] = mtimedb["resume"]
del mtimedb["resume"]
mtimedb.commit()
- mtimedb["resume"]={}
- # Stored as a dict starting with portage-2.1.6_rc1, and supported
- # by >=portage-2.1.3_rc8. Versions <portage-2.1.3_rc8 only support
- # a list type for options.
- mtimedb["resume"]["myopts"] = myopts.copy()
-
- # Convert Atom instances to plain str.
- mtimedb["resume"]["favorites"] = [str(x) for x in favorites]
pkglist = mydepgraph.altlist()
mydepgraph.saveNomergeFavorites()