Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>, Mike Gilbert <floppym@g.o>, James Le Cuirot <chewi@g.o>
Subject: Re: [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script
Date: Thu, 17 Dec 2020 20:51:03
Message-Id: CAJ0EP41+gwJ2eKTA=RqPmS===kAOEuJVG-obuuNy3A=epVuRsg@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH 1/3] dev-util/meson: install meson-array script by William Hubbs
1 On Thu, Dec 17, 2020 at 3:38 PM William Hubbs <williamh@g.o> wrote:
2 >
3 > On Sat, Dec 12, 2020 at 09:22:06PM -0500, Mike Gilbert wrote:
4 > > On Sat, Dec 12, 2020 at 9:09 PM William Hubbs <williamh@g.o> wrote:
5 > > >
6 > > > On Sat, Dec 12, 2020 at 04:25:48PM -0500, Mike Gilbert wrote:
7 > > > > On Sat, Dec 12, 2020 at 3:48 PM William Hubbs <williamh@g.o> wrote:
8 > > > > > If both /usr/bin/python and /usr/bin/python3 are going away, the best
9 > > > > > choice would be to add functionality to python-exec or eselect python to tell us
10 > > > > > the path to the default python interpretor. Once we know that we call it
11 > > > > > directly.
12 > > > >
13 > > > > I don't think they are "going away". There is a USE flag on
14 > > > > dev-lang/python-exec that makes them optional, and I think it will be
15 > > > > forcibly enabled for the foreseeable future.
16 > > > >
17 > > > > > Please do not apply this patch to meson; I think we can figure something
18 > > > > > out that is better.
19 > > > >
20 > > > > I think installing a small script to help translate arguments from one
21 > > > > format to another is a reasonable solution.
22 > > >
23 > > > I think we should look at the eclass to see if we can provide functions
24 > > > that can be used by consumers to handle this.
25 > >
26 > > I don't really understand what you mean by this. I am converting one
27 > > internal bash function into an external script so that its python
28 > > dependencies can be better defined and managed.
29 >
30 > What I mean is, ebuilds should not be calling _meson_env_array at all
31 > since it is defined and documented as an eclass internal function.
32 >
33 > I would like to know more about what the gallium-nine-standalone ebuild
34 > is doing and why it needs to call a meson.eclass internal function.
35 >
36 > On the other hand, if _meson_env_array is meant to be called by ebuilds,
37 > we need to rename it and improve the documentation for it in the eclass.
38
39 I do not really care about gallium-nine-standalone and its abuse of
40 the private _meson_env_array function. That's an issue that should be
41 separate from the change I am proposing. I am only touching the ebuild
42 because my patch removes the _meson_env_array function and I want to
43 avoid breaking the ebuild.
44
45 > > > Also, I don't think your script will run if native-symlinks is disabled since in
46 > > > that setting /usr/bin/python would not exist.
47 > >
48 > > python_doscript updates the shebang before installing the script.
49 >
50 > Ok, I didn't know python_doscript does this, but couldn't we just
51 > change line 129 in the eclass to "python3 -c ..."?
52
53 No, that will not help in any way.
54
55 > > > I question the value of the native-symlinks use flag on python-exec
56 > > > unless there is a way to query the path of the default python
57 > > > interpretor.
58 > >
59 > > Regardless, I don't see how that makes my solution a bad thing. It
60 > > ensures that the code will be executed by a known/support/tested
61 > > version of python.
62 > >
63 >
64 > I'm not sure how useful the script is as a command, so I don't think it
65 > should be installed that way, but I do want to hear more about this,
66 > both from you and chewi. :-)
67
68 I don't see any reasonable way to make it work otherwise. If you have
69 no better suggestion, please refrain from further comments.

Replies