public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python@lists.gentoo.org
Cc: python@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-python] [PATCH python-exec] Read Python2/3 choices from files rather than symlinks
Date: Sun, 15 Nov 2015 10:40:39 +0100	[thread overview]
Message-ID: <1447580439-17877-1-git-send-email-mgorny@gentoo.org> (raw)

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



                 reply	other threads:[~2015-11-15  9:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447580439-17877-1-git-send-email-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-python@lists.gentoo.org \
    --cc=python@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox