Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
Date: Sun, 20 Dec 2020 21:54:39
Message-Id: CAJ0EP43=2ximaPQoEG3nytGi_v-1Kwjd3FkpvqPmXd+pzmT9-w@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array by William Hubbs
1 On Sun, Dec 20, 2020 at 2:13 PM William Hubbs <williamh@g.o> wrote:
2 >
3 > On Thu, Dec 17, 2020 at 10:58:23PM +0100, Michał Górny wrote:
4 > > On Thu, 2020-12-17 at 16:50 -0500, Mike Gilbert wrote:
5 > > > On Thu, Dec 17, 2020 at 4:44 PM Michał Górny <mgorny@g.o>
6 > > > wrote:
7 > > > >
8 > > > > On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote:
9 > > > > > Closes: https://bugs.gentoo.org/759433
10 > > > > > Signed-off-by: Mike Gilbert <floppym@g.o>
11 > > > > > ---
12 > > > > > eclass/meson.eclass | 3 ++-
13 > > > > > 1 file changed, 2 insertions(+), 1 deletion(-)
14 > > > > >
15 > > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass
16 > > > > > index 21338280df33..6296f1dd26e5 100644
17 > > > > > --- a/eclass/meson.eclass
18 > > > > > +++ b/eclass/meson.eclass
19 > > > > > @@ -126,7 +126,8 @@ EOF
20 > > > > > # '--unicode-16=𐐷', '--unicode-32=𐤅']
21 > > > > > #
22 > > > > > _meson_env_array() {
23 > > > > > - python -c "${__MESON_ARRAY_PARSER}" "$@"
24 > > > > > + local python="$(eselect python show)"
25 > > > > > + ${python} -c "${__MESON_ARRAY_PARSER}" "$@"
26 > > > > > }
27 > > > > >
28 > > > > > # @FUNCTION: _meson_get_machine_info
29 > > > >
30 > > > > You're missing a BDEPEND on app-eselect/eselect-python.
31 > > > >
32 > > > > Also, I really don't like these workarounds. It takes a lot of
33 > > > > effort
34 > > > > to figure out how to break stuff, so people stop doing awful
35 > > > > things.
36 > > > > It's disrespectful to my time when you invent new hacks. Now I'll
37 > > > > have
38 > > > > to figure out how to change eselect-python to break it.
39 > > >
40 > > > Why is this such an awful thing to do?
41 > > >
42 > > > The code should be able to execute with any version of python
43 > > > currently supported by Gentoo.
44 > > >
45 > > > Please don't assume that I'm trying to avoid a proper solution here.
46 > > > Please suggest a better alternative if you have one.
47 > >
48 > > I actually liked installing the script to the system.
49 >
50 > If we are going to install it to the system, that should not be done by
51 > dev-util/meson; it is a gentoo-specific script, so we should probably
52 > create a separate package for it. Also, it is debatable whether that
53 > script should be installed in a directory that is on the path.
54
55 I don't really want to create a separate package to install a single
56 file. dev-util/meson is just a convenient place to install it.
57
58 I think it is ok to install it in PATH, so long as it is unlikely to
59 conflict with other program names.
60
61 > I have major concerns about the native-symlinks use flag for python-exec.
62 > It looks like turning this flag off would result in /usr/bin/python not being
63 > installed which will cause massive breakage. This is similar to removing
64 > /bin/sh., so I am strongly against the idea of this use flag unless
65 > upstream python is recommending it. If they are not installing
66 > /usr/bin/python in their native builds any longer, I'll be quiet.
67 > Otherwise, imo this is a really bad idea for a use flag.
68
69 The native-symlinks flag exists to break things intentionally.
70
71 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd5d2f9ea331119ea681e52ccaff1bce172ac98