Fix misc amount of out-of-prefix issues
authorFabian Groffen <grobian@gentoo.org>
Wed, 16 Jul 2008 17:53:11 +0000 (17:53 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 16 Jul 2008 17:53:11 +0000 (17:53 -0000)
svn path=/main/branches/prefix/; revision=11085

pym/portage/__init__.py
pym/portage/dbapi/vartree.py
pym/portage/sets/files.py

index 06629add02a37b2fe9f87102724c4c0d609423f7..69f1c67736890f2046524e7892355826e7e8a0bf 100644 (file)
@@ -1694,13 +1694,13 @@ class config(object):
                dir_mode_map = {
                        EPREFIX_LSTRIP+"/tmp" : (                  -1, 01777,  0,  True),
                        EPREFIX_LSTRIP+"/var/tmp" : (              -1, 01777,  0,  True),
-                       PRIVATE_PATH      : (             portage_gid, 02750, 02,  False),
-                       CACHE_PATH                     : (portage_gid,  0755, 02,  False)
+                       EPREFIX_LSTRIP+PRIVATE_PATH : (   portage_gid, 02750, 02,  False),
+                       CACHE_PATH.lstrip(os.path.sep) : (portage_gid,  0755, 02,  False)
                }
 
                for mypath, (gid, mode, modemask, preserve_perms) \
                        in dir_mode_map.iteritems():
-                       mydir = os.path.join(self["ROOT"], mypath.lstrip(os.path.sep))
+                       mydir = os.path.join(self["ROOT"], mypath)
                        if preserve_perms and os.path.isdir(mydir):
                                # Only adjust permissions on some directories if
                                # they don't exist yet. This gives freedom to the
index 4bc7ab87b5cce97229079e25f46b724f9242c274..ba163dbeace73f13b9152b18aebe855ef48f638d 100644 (file)
@@ -458,7 +458,7 @@ class vardbapi(dbapi):
 
                try:
                        self.plib_registry = PreservedLibsRegistry(
-                               os.path.join(self.root, PRIVATE_PATH, "preserved_libs_registry"))
+                               os.path.join(self.root, EPREFIX_LSTRIP, PRIVATE_PATH, "preserved_libs_registry"))
                except PermissionDenied:
                        # apparently this user isn't allowed to access PRIVATE_PATH
                        self.plib_registry = None
index e30785621343af96e55ff1f75d76e456df813a76..d71ea7d33774874e5f3c55ad3e061893a371ba20 100644 (file)
@@ -169,11 +169,11 @@ class WorldSet(EditablePackageSet):
                # most attributes exist twice as atoms and non-atoms are stored in 
                # separate files
                self._lock = None
-               self._filename = os.path.join(os.sep, root, PRIVATE_PATH.lstrip(os.sep), "world")
+               self._filename = os.path.join(os.sep, root, EPREFIX_LSTRIP, PRIVATE_PATH.lstrip(os.sep), "world")
                self.loader = ItemFileLoader(self._filename, self._validate)
                self._mtime = None
                
-               self._filename2 = os.path.join(os.sep, root, PRIVATE_PATH.lstrip(os.sep), "world_sets")
+               self._filename2 = os.path.join(os.sep, root, EPREFIX_LSTRIP,  PRIVATE_PATH.lstrip(os.sep), "world_sets")
                self.loader2 = ItemFileLoader(self._filename2, self._validate2)
                self._mtime2 = None