From bdfc794376e82e696622b49bf0845c6e45c921fb Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 16 Jul 2008 17:53:11 +0000 Subject: [PATCH] Fix misc amount of out-of-prefix issues svn path=/main/branches/prefix/; revision=11085 --- pym/portage/__init__.py | 6 +++--- pym/portage/dbapi/vartree.py | 2 +- pym/portage/sets/files.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 06629add0..69f1c6773 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 4bc7ab87b..ba163dbea 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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 diff --git a/pym/portage/sets/files.py b/pym/portage/sets/files.py index e30785621..d71ea7d33 100644 --- a/pym/portage/sets/files.py +++ b/pym/portage/sets/files.py @@ -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 -- 2.26.2