In Gentoo Prefix, the host may not have python3 installed. Use python-any-r1 to ensure python is installed and patch the shebangs of the python scripts. Reproducible: Always
Created attachment 620102 [details, diff] xkeyboard-config.patch Hi X11 Team, I intend to commit the attached patch, mainly for Gentoo Prefix. The build system uses python in several of its helper scripts, therefore python-any-r1 is inherited. What do you think?
Thanks! Please add python 3.7 and 3.8 to PYTHON_COMPAT. I don't see any other packages in tree that seem to be doing this sort of replacement of /usr/bin/env ... with ${EPYTHON}. Why is this necessary for xkeyboard-config?
(In reply to Matt Turner from comment #2) > I don't see any other packages in tree that seem to be doing this sort of > replacement of /usr/bin/env ... with ${EPYTHON}. Why is this necessary for > xkeyboard-config? To be clear: I want to understand this before the patch is committed.
(In reply to Matt Turner from comment #2) > Thanks! > > Please add python 3.7 and 3.8 to PYTHON_COMPAT. Sure. > I don't see any other packages in tree that seem to be doing this sort of > replacement of /usr/bin/env ... with ${EPYTHON}. Why is this necessary for > xkeyboard-config? On a Prefix for example (EPREFIX=/opt/gentoo), it is possible that the host does not have /usr/bin/python3. We need to let .py scripts to point to /opt/gentoo/usr/bin/python3. `/usr/bin/env ${EPYTHON}` alternatively does the same thing.
Sure, that makes sense. But why don't I see a bunch of existing cases of this in the tree?
(In reply to Matt Turner from comment #5) > Sure, that makes sense. But why don't I see a bunch of existing cases of > this in the tree? I am not sure. Probably because almost all host have Python 3 installed.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ab49193d9e8645eeaa98aa14b5ecd79084bc964 commit 9ab49193d9e8645eeaa98aa14b5ecd79084bc964 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2020-03-17 07:19:02 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2020-03-17 07:21:53 +0000 x11-misc/xkeyboard-config: Fix shebang Bug: https://bugs.gentoo.org/712792 Signed-off-by: Matt Turner <mattst88@gentoo.org> ...xkeyboard-config-2.29-fix-python3-support.patch | 34 ++++++++++++++++++++++ .../xkeyboard-config/xkeyboard-config-2.29.ebuild | 4 +++ 2 files changed, 38 insertions(+)
Arfrever helped identify the likely cause of your problem: a /usr/bin/python3 shebang (whereas the other python script had /usr/bin/env python3). I expect the patch I committed (from upstream) fixes the problem for you. Can you confirm?
By the way, your patch didn't apply. Not sure how you generated it. Use git format-patch next time. Also, it should have BDEPEND="${PYTHON_DEPS}". I wouldn't bother revbumping 2.29.
(In reply to Larry the Git Cow from comment #7) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=9ab49193d9e8645eeaa98aa14b5ecd79084bc964 > > commit 9ab49193d9e8645eeaa98aa14b5ecd79084bc964 > Author: Matt Turner <mattst88@gentoo.org> > AuthorDate: 2020-03-17 07:19:02 +0000 > Commit: Matt Turner <mattst88@gentoo.org> > CommitDate: 2020-03-17 07:21:53 +0000 > > x11-misc/xkeyboard-config: Fix shebang > > Bug: https://bugs.gentoo.org/712792 > Signed-off-by: Matt Turner <mattst88@gentoo.org> > > ...xkeyboard-config-2.29-fix-python3-support.patch | 34 > ++++++++++++++++++++++ > .../xkeyboard-config/xkeyboard-config-2.29.ebuild | 4 +++ > 2 files changed, 38 insertions(+) I think that will definitely fix this bug! Thanks.
(In reply to Matt Turner from comment #9) > By the way, your patch didn't apply. Not sure how you generated it. Use git > format-patch next time. I used `git show > x.patch`. Maybe my tree is not new enough. > > Also, it should have BDEPEND="${PYTHON_DEPS}". I wouldn't bother revbumping > 2.29. I used python-any-r1 just for the sake of correctness, as quoting from the eclass inline doc: "A minimal eclass for packages which need any Python interpreter installed without a need for explicit choice and invariability". But as long as it compiles with the shabeng fix, it is of low priority.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9500cb315bbe6705f796aa7454d76e0eef020002 commit 9500cb315bbe6705f796aa7454d76e0eef020002 Author: Benda Xu <heroxbd@gentoo.org> AuthorDate: 2020-03-19 22:13:03 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2020-03-19 22:30:43 +0000 x11-misc/xkeyboard-config: Use python-any-r1 Closes: https://bugs.gentoo.org/712792 Signed-off-by: Benda Xu <heroxbd@gentoo.org> Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-misc/xkeyboard-config/xkeyboard-config-2.29.ebuild | 7 +++++++ x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild | 7 +++++++ 2 files changed, 14 insertions(+)