Don't save "uninstall" tasks in the resume list since they'll be regenerated
authorZac Medico <zmedico@gentoo.org>
Thu, 8 May 2008 18:35:39 +0000 (18:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 8 May 2008 18:35:39 +0000 (18:35 -0000)
by dependency calculations upon resume.

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

pym/_emerge/__init__.py

index f245805cd63fbf8f2165e7aa48f0e72f3e795ea0..7a7526d2d0336ef7a81c8e7de89051b23f6a2f05 100644 (file)
@@ -5058,7 +5058,7 @@ class depgraph(object):
                        pkg_type, myroot, pkg_key, action = x
                        if pkg_type not in self.pkg_tree_map:
                                continue
-                       if action not in ("merge", "uninstall"):
+                       if action != "merge":
                                continue
                        mydb = trees[myroot][self.pkg_tree_map[pkg_type]].dbapi
                        try:
@@ -5615,7 +5615,7 @@ class MergeTask(object):
                world_set = root_config.sets["world"]
 
                mtimedb["resume"]["mergelist"] = [list(x) for x in mylist \
-                       if isinstance(x, Package)]
+                       if isinstance(x, Package) and x.operation == "merge"]
                mtimedb.commit()
 
                mymergelist = mylist
@@ -5705,8 +5705,6 @@ class MergeTask(object):
                                if not (buildpkgonly or fetchonly or pretend):
                                        unmerge(root_config, self.myopts, "unmerge",
                                                [pkg.cpv], mtimedb["ldpath"], clean_world=0)
-                                       del mtimedb["resume"]["mergelist"][0]
-                                       mtimedb.commit()
                                continue
 
                        if x[0]=="blocks":