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 52B711384B4 for ; Sun, 15 Nov 2015 09:40:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0ABE21C162; Sun, 15 Nov 2015 09:40:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 68ADB21C162 for ; Sun, 15 Nov 2015 09:40:46 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 603DC3406AD; Sun, 15 Nov 2015 09:40:44 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-python] [PATCH python-exec] Read Python2/3 choices from files rather than symlinks Date: Sun, 15 Nov 2015 10:40:39 +0100 Message-Id: <1447580439-17877-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org X-Archives-Salt: 30c2a638-cfe9-49c1-965f-df2b08b4a97c X-Archives-Hash: a8368b05fc8ce5179dd0fce300cb2526 The new eselect-python version has moved python[23] selection into regular files, to replace /usr/bin/python[23] symlinks with python-exec. Update python-exec appropriately. --- src/python-exec-c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) [This is a followup for eselect-python changes in how python[23] choice is stored.] diff --git a/src/python-exec-c.c b/src/python-exec-c.c index 8ee5dd2..a9a2f73 100644 --- a/src/python-exec-c.c +++ b/src/python-exec-c.c @@ -369,12 +369,10 @@ int main(int argc, char* argv[]) execute(scriptbuf, argv); if (try_file(bufpy, fnpos, EPREFIX "/etc/env.d/python/config", max_epython_len)) execute(scriptbuf, argv); -#ifdef HAVE_READLINK - if (try_symlink(bufpy, fnpos, EPREFIX "/usr/bin/python2", max_epython_len)) + if (try_file(bufpy, fnpos, EPREFIX "/etc/env.d/python/python2", max_epython_len)) execute(scriptbuf, argv); - if (try_symlink(bufpy, fnpos, EPREFIX "/usr/bin/python3", max_epython_len)) + if (try_file(bufpy, fnpos, EPREFIX "/etc/env.d/python/python3", max_epython_len)) execute(scriptbuf, argv); -#endif for (i = python_impls; *i; ++i) { -- 2.6.3