summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-01 08:43:10 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-01 08:43:10 +0000
commit1b14d63fb6cc42b4251954999728b2af9c46a3b6 (patch)
tree24335ba979e55a235c403cfd404da531bccdeff2
parent3bfd9039618327bc1c05d0ded0d2cd3ed586b4ec (diff)
downloadportage-1b14d63fb6cc42b4251954999728b2af9c46a3b6.tar.gz
portage-1b14d63fb6cc42b4251954999728b2af9c46a3b6.tar.bz2
portage-1b14d63fb6cc42b4251954999728b2af9c46a3b6.zip
Never do realpath() on an empty string for portdbapi.porttree_root since
otherwise it can evaluate to $CWD which leads to undesireable results. svn path=/main/trunk/; revision=10867
-rw-r--r--pym/portage/dbapi/porttree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index b6e39f63b..e2a53aac4 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -63,7 +63,9 @@ class portdbapi(dbapi):
self.manifestVerifier = portage.gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel)
#self.root=settings["PORTDIR"]
- self.porttree_root = os.path.realpath(porttree_root)
+ self.porttree_root = porttree_root
+ if porttree_root:
+ self.porttree_root = os.path.realpath(porttree_root)
self.depcachedir = os.path.realpath(self.mysettings.depcachedir)