From 4f5a671ae7dad30e293b70be57e0f2fe4f436ec7 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 11 Sep 2008 17:47:56 +0000 Subject: [PATCH] Fix usages of WORLD_FILE (seems to be a mixup of config_root and target_root, of which the latter caused problems as observed by darkside in bug #237323 svn path=/main/branches/prefix/; revision=11505 --- bin/emaint | 2 +- bin/regenworld | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/emaint b/bin/emaint index 084c8c327..c5135212b 100755 --- a/bin/emaint +++ b/bin/emaint @@ -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 diff --git a/bin/regenworld b/bin/regenworld index 4c831a01d..7d9fccf4b 100755 --- a/bin/regenworld +++ b/bin/regenworld @@ -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") -- 2.26.2