commit 62b2fa550853e1c633311d01f0ac0e233c3de421 Author: Michał Górny Date: Sat Apr 17 14:57:12 2010 +0200 Convert os.environ['PWD'] to unicode format to make it suitable for comparison with mycwd. diff --git a/bin/ebuild b/bin/ebuild index 3eaea94..fd87615 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -116,9 +116,10 @@ if not os.path.isabs(ebuild): # Try to get the non-canonical path from the PWD evironment variable, since # the canonical path returned from os.getcwd() may may be unusable in # cases where the directory stucture is built from symlinks. - if "PWD" in os.environ and os.environ["PWD"] != mycwd and \ - os.path.realpath(os.environ["PWD"]) == mycwd: - mycwd = portage.normalize_path(os.environ["PWD"]) + if "PWD" in os.environ: + mypwd = portage._unicode_decode(os.environ["PWD"], encoding=portage._encodings['fs']) + if mypwd != mycwd and os.path.realpath(mypwd) == mycwd: + mycwd = portage.normalize_path(os.environ["PWD"]) ebuild = os.path.join(mycwd, ebuild) ebuild = portage.normalize_path(ebuild) # portdbapi uses the canonical path for the base of the portage tree, but