Move mtimedb resume list code from action_build() to
authorZac Medico <zmedico@gentoo.org>
Mon, 20 Jul 2009 21:21:22 +0000 (21:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 20 Jul 2009 21:21:22 +0000 (21:21 -0000)
Scheduler._save_resume_list().

svn path=/main/trunk/; revision=13841

pym/_emerge/Scheduler.py
pym/_emerge/actions.py

index 5eeb17e9929c22f510fdba52b01b4b23b5073e4c..246ed2a71c15df5eaa8f4f5078ec45c4d0b6ab7e 100644 (file)
@@ -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"]
index 0a48271c5941a758031ccdf3b7a90dcb672eeb15..2d664ca809a58a834dba17d56aba73c36979cb49 100644 (file)
@@ -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()