From 1b14d63fb6cc42b4251954999728b2af9c46a3b6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 1 Jul 2008 08:43:10 +0000 Subject: [PATCH] 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 --- pym/portage/dbapi/porttree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.26.2