Global var profiledir was only being set correctly when portage was imported by emerge
authorJason Stubbs <jstubbs@gentoo.org>
Mon, 10 Oct 2005 05:18:16 +0000 (05:18 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Mon, 10 Oct 2005 05:18:16 +0000 (05:18 -0000)
svn path=/main/branches/2.0/; revision=2119

pym/portage.py

index 74a37d161a6f7def55db3f3ab85029c9a94c4462..9adef5521cd91000772caf89ab2ad7f31e90e9c7 100644 (file)
@@ -7148,9 +7148,9 @@ if not os.path.exists(root+"var/lib/portage"):
 
 os.umask(022)
 profiledir=None
-if "PORTAGE_CALLER" in os.environ and os.environ["PORTAGE_CALLER"] == "emerge" and os.path.isdir(PROFILE_PATH):
+if os.path.isdir(PROFILE_PATH):
        profiledir = PROFILE_PATH
-       if os.access(DEPRECATED_PROFILE_FILE, os.R_OK):
+       if "PORTAGE_CALLER" in os.environ and os.environ["PORTAGE_CALLER"] == "emerge" and os.access(DEPRECATED_PROFILE_FILE, os.R_OK):
                deprecatedfile = open(DEPRECATED_PROFILE_FILE, "r")
                dcontent = deprecatedfile.readlines()
                deprecatedfile.close()