diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-01 08:43:10 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-01 08:43:10 +0000 |
commit | 1b14d63fb6cc42b4251954999728b2af9c46a3b6 (patch) | |
tree | 24335ba979e55a235c403cfd404da531bccdeff2 | |
parent | 3bfd9039618327bc1c05d0ded0d2cd3ed586b4ec (diff) | |
download | portage-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.py | 4 |
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) |