From f3e60706d495fef6eaf366ef69d2b08b3a55db9b Mon Sep 17 00:00:00 2001
From: Zac Medico <zmedico@gentoo.org>
Date: Mon, 20 Jul 2009 21:21:22 +0000
Subject: [PATCH] Move mtimedb resume list code from action_build() to
 Scheduler._save_resume_list().

svn path=/main/trunk/; revision=13841
---
 pym/_emerge/Scheduler.py | 9 +++++++++
 pym/_emerge/actions.py   | 8 --------
 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()
-- 
2.26.2