From: Zac Medico Date: Tue, 1 Jul 2008 08:43:10 +0000 (-0000) Subject: Never do realpath() on an empty string for portdbapi.porttree_root since X-Git-Tag: v2.2_rc2~259 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1b14d63fb6cc42b4251954999728b2af9c46a3b6;p=portage.git 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 --- 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)