Use FakeVartree for vardb lock/cache during depclean.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 22:42:20 +0000 (22:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 22:42:20 +0000 (22:42 -0000)
svn path=/main/trunk/; revision=5191

bin/emerge

index cdc22fabef716dd732fc4402284233f4637cd371..a5fdad3907264d8befa5301d2230d70369d55e2d 100755 (executable)
@@ -3894,7 +3894,7 @@ def action_depclean(settings, trees, ldpath_mtimes,
 
        xterm_titles = "notitles" not in settings.features
        portdb = trees[settings["ROOT"]]["porttree"].dbapi
-       vartree = trees[settings["ROOT"]]["vartree"]
+       vartree = FakeVartree(trees[settings["ROOT"]]["vartree"])
        vardb = vartree.dbapi
        syslist = getlist(settings, "system")
        worldlist = getlist(settings, "world")
@@ -3995,7 +3995,8 @@ def action_depclean(settings, trees, ldpath_mtimes,
        cleanlist = [pkg for pkg in vardb.cpv_all() if not fakedb.cpv_exists(pkg)]
 
        if len(cleanlist):
-               unmerge(settings, myopts, vartree, "unmerge", cleanlist, ldpath_mtimes)
+               unmerge(settings, myopts, trees[settings["ROOT"]]["vartree"],
+                       "unmerge", cleanlist, ldpath_mtimes)
 
        print "Packages installed:   "+str(len(myvarlist))
        print "Packages in world:    "+str(len(worldlist))