Fix usages of WORLD_FILE (seems to be a mixup of config_root and target_root, of...
authorFabian Groffen <grobian@gentoo.org>
Thu, 11 Sep 2008 17:47:56 +0000 (17:47 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 11 Sep 2008 17:47:56 +0000 (17:47 -0000)
svn path=/main/branches/prefix/; revision=11505

bin/emaint
bin/regenworld

index 084c8c327633bb161081465f5e4c214d233a9f0e..c5135212b2b64a6c0095b4bf9b3071458a677643 100755 (executable)
@@ -37,7 +37,7 @@ class WorldHandler(object):
        def _check_world(self, onProgress):
                categories = set(portage.settings.categories)
                myroot = portage.settings["ROOT"]
-               self.world_file = os.path.join(myroot, portage.const.WORLD_FILE)
+               self.world_file = os.path.join(myroot, portage.const.EPREFIX_LSTRIP, portage.const.WORLD_FILE)
                self.found = os.access(self.world_file, os.R_OK)
                vardb = portage.db[myroot]["vartree"].dbapi
 
index 4c831a01dfabe327a064b4c4787b3aa944c172cf..7d9fccf4b5a54156bbafd85c80484a3d0e4d418c 100755 (executable)
@@ -44,7 +44,7 @@ def isunwanted(pkgline):
                __uniqlist__.append(pkgline)
                return True
 
-world_file = os.path.join("/", portage.WORLD_FILE)
+world_file = os.path.join(portage.const.EPREFIX, portage.WORLD_FILE)
 
 # show a little description if we have arguments
 if len(sys.argv) >= 2 and sys.argv[1] in ["-h", "--help"]:
@@ -54,7 +54,7 @@ if len(sys.argv) >= 2 and sys.argv[1] in ["-h", "--help"]:
        print "your existing world file (%s) before using this tool." % world_file
        sys.exit(0)
 
-worldlist = portage.grabfile(os.path.join("/", portage.WORLD_FILE))
+worldlist = portage.grabfile(os.path.join(portage.const.EPREFIX, portage.WORLD_FILE))
 syslist = portage.settings.packages
 syslist = filter(issyspkg, syslist)
 
@@ -98,5 +98,5 @@ for mykey in biglist:
                        print "add to world:",myfavkey
                        worldlist.append(myfavkey)
 
-portage.write_atomic(os.path.join("/", portage.WORLD_FILE),
+portage.write_atomic(os.path.join(portage.const.EPREFIX, portage.WORLD_FILE),
        "\n".join(sorted(worldlist)) + "\n")