From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 02AE8198005 for ; Fri, 22 Mar 2013 01:42:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E5D9E067D; Fri, 22 Mar 2013 01:42:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0CFF7E067D for ; Fri, 22 Mar 2013 01:42:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1F06633D3D6 for ; Fri, 22 Mar 2013 01:42:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7BC5EE4073 for ; Fri, 22 Mar 2013 01:42:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1363916540.ebd93103ea9ad9a95147f21faca01c5d6478eab8.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/const.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ebd93103ea9ad9a95147f21faca01c5d6478eab8 X-VCS-Branch: master Date: Fri, 22 Mar 2013 01:42:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bccd645b-01fa-424d-aad8-0a51787b7e65 X-Archives-Hash: 30b0e1a6829b9bb771e11892ade5c787 commit: ebd93103ea9ad9a95147f21faca01c5d6478eab8 Author: Zac Medico gentoo org> AuthorDate: Fri Mar 22 01:42:20 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Mar 22 01:42:20 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ebd93103 portage.const: realpath(__file__.rstrip("co")) With python2.x, __file__ may refer to the compiled bytcode file, but we want to follow the symlink of the uncompile py file. --- pym/portage/const.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pym/portage/const.py b/pym/portage/const.py index 93556a0..5e960d9 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -60,7 +60,7 @@ GLOBAL_CONFIG_PATH = "/usr/share/portage/config" # these variables are not used with target_root or config_root # NOTE: Use realpath(__file__) so that python module symlinks in site-packages # are followed back to the real location of the whole portage installation. -PORTAGE_BASE_PATH = os.path.join(os.sep, os.sep.join(os.path.realpath(__file__).split(os.sep)[:-3])) +PORTAGE_BASE_PATH = os.path.join(os.sep, os.sep.join(os.path.realpath(__file__.rstrip("co")).split(os.sep)[:-3])) PORTAGE_BIN_PATH = PORTAGE_BASE_PATH + "/bin" PORTAGE_PYM_PATH = PORTAGE_BASE_PATH + "/pym" LOCALE_DATA_PATH = PORTAGE_BASE_PATH + "/locale" # FIXME: not used