Revert r3371 because it doesn't fix the real problem and get ROOT directly from porta...
authorZac Medico <zmedico@gentoo.org>
Thu, 18 May 2006 08:45:09 +0000 (08:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 18 May 2006 08:45:09 +0000 (08:45 -0000)
svn path=/main/trunk/; revision=3372

bin/emerge

index 2cb627dbfd085e888f4539329ecb67a542872219..f4a5f95ff4388fd2b2913b76f84b376214ed0e72 100755 (executable)
@@ -2074,11 +2074,11 @@ class depgraph:
                                        if self.pkgsettings["AUTOCLEAN"]=="yes":
                                                xsplit=portage.pkgsplit(x[2])
                                                emergelog(" >>> AUTOCLEAN: "+xsplit[0])
-                                               if x[1] == self.pkgsettings["ROOT"]:
-                                                       try:
-                                                               retval = unmerge("clean", [xsplit[0]])
-                                                       except portage_exception.PackageNotFound:
-                                                               retval = 0
+                                               if x[1] == portage.settings["ROOT"]:
+                                                       # Compare against portage.settings["ROOT"] because
+                                                       # the value of self.pkgsettings["ROOT"] does not
+                                                       # match the original value!
+                                                       retval = unmerge("clean", [xsplit[0]])
                                                else:
                                                        retval = unmerge_overlapping(x[2], x[1],
                                                                self.pkgsettings, portage.db[x[1]]["vartree"])