Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
On Sun, Dec 20, 2020 at 2:13 PM William Hubbs wrote: > > On Thu, Dec 17, 2020 at 10:58:23PM +0100, Micha艂 G贸rny wrote: > > On Thu, 2020-12-17 at 16:50 -0500, Mike Gilbert wrote: > > > On Thu, Dec 17, 2020 at 4:44 PM Micha艂 G贸rny > > > wrote: > > > > > > > > On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote: > > > > > Closes: https://bugs.gentoo.org/759433 > > > > > Signed-off-by: Mike Gilbert > > > > > --- > > > > > eclass/meson.eclass | 3 ++- > > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > > > > > index 21338280df33..6296f1dd26e5 100644 > > > > > --- a/eclass/meson.eclass > > > > > +++ b/eclass/meson.eclass > > > > > @@ -126,7 +126,8 @@ EOF > > > > > # '--unicode-16=饜惙', '--unicode-32=饜'] > > > > > # > > > > > _meson_env_array() { > > > > > - python -c "${__MESON_ARRAY_PARSER}" "$@" > > > > > + local python="$(eselect python show)" > > > > > + ${python} -c "${__MESON_ARRAY_PARSER}" "$@" > > > > > } > > > > > > > > > > # @FUNCTION: _meson_get_machine_info > > > > > > > > You're missing a BDEPEND on app-eselect/eselect-python. > > > > > > > > Also, I really don't like these workarounds. It takes a lot of > > > > effort > > > > to figure out how to break stuff, so people stop doing awful > > > > things. > > > > It's disrespectful to my time when you invent new hacks. Now I'll > > > > have > > > > to figure out how to change eselect-python to break it. > > > > > > Why is this such an awful thing to do? > > > > > > The code should be able to execute with any version of python > > > currently supported by Gentoo. > > > > > > Please don't assume that I'm trying to avoid a proper solution here. > > > Please suggest a better alternative if you have one. > > > > I actually liked installing the script to the system. > > If we are going to install it to the system, that should not be done by > dev-util/meson; it is a gentoo-specific script, so we should probably > create a separate package for it. Also, it is debatable whether that > script should be installed in a directory that is on the path. I don't really want to create a separate package to install a single file. dev-util/meson is just a convenient place to install it. I think it is ok to install it in PATH, so long as it is unlikely to conflict with other program names. > I have major concerns about the native-symlinks use flag for python-exec. > It looks like turning this flag off would result in /usr/bin/python not being > installed which will cause massive breakage. This is similar to removing > /bin/sh., so I am strongly against the idea of this use flag unless > upstream python is recommending it. If they are not installing > /usr/bin/python in their native builds any longer, I'll be quiet. > Otherwise, imo this is a really bad idea for a use flag. The native-symlinks flag exists to break things intentionally. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd5d2f9ea331119ea681e52ccaff1bce172ac98
Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
On Thu, Dec 17, 2020 at 10:58:23PM +0100, Micha艂 G贸rny wrote: > On Thu, 2020-12-17 at 16:50 -0500, Mike Gilbert wrote: > > On Thu, Dec 17, 2020 at 4:44 PM Micha艂 G贸rny > > wrote: > > > > > > On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote: > > > > Closes: https://bugs.gentoo.org/759433 > > > > Signed-off-by: Mike Gilbert > > > > --- > > > > 聽eclass/meson.eclass | 3 ++- > > > > 聽1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > > > > index 21338280df33..6296f1dd26e5 100644 > > > > --- a/eclass/meson.eclass > > > > +++ b/eclass/meson.eclass > > > > @@ -126,7 +126,8 @@ EOF > > > > 聽#聽 '--unicode-16=饜惙', '--unicode-32=饜'] > > > > 聽# > > > > 聽_meson_env_array() { > > > > -聽聽 python -c "${__MESON_ARRAY_PARSER}" "$@" > > > > +聽聽 local python="$(eselect python show)" > > > > +聽聽 ${python} -c "${__MESON_ARRAY_PARSER}" "$@" > > > > 聽} > > > > > > > > 聽# @FUNCTION: _meson_get_machine_info > > > > > > You're missing a BDEPEND on app-eselect/eselect-python. > > > > > > Also, I really don't like these workarounds.聽 It takes a lot of > > > effort > > > to figure out how to break stuff, so people stop doing awful > > > things. > > > It's disrespectful to my time when you invent new hacks.聽 Now I'll > > > have > > > to figure out how to change eselect-python to break it. > > > > Why is this such an awful thing to do? > > > > The code should be able to execute with any version of python > > currently supported by Gentoo. > > > > Please don't assume that I'm trying to avoid a proper solution here. > > Please suggest a better alternative if you have one. > > I actually liked installing the script to the system. If we are going to install it to the system, that should not be done by dev-util/meson; it is a gentoo-specific script, so we should probably create a separate package for it. Also, it is debatable whether that script should be installed in a directory that is on the path. I have major concerns about the native-symlinks use flag for python-exec. It looks like turning this flag off would result in /usr/bin/python not being installed which will cause massive breakage. This is similar to removing /bin/sh., so I am strongly against the idea of this use flag unless upstream python is recommending it. If they are not installing /usr/bin/python in their native builds any longer, I'll be quiet. Otherwise, imo this is a really bad idea for a use flag. William signature.asc Description: PGP signature
Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
On Thu, 2020-12-17 at 16:50 -0500, Mike Gilbert wrote: > On Thu, Dec 17, 2020 at 4:44 PM Micha艂 G贸rny > wrote: > > > > On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote: > > > Closes: https://bugs.gentoo.org/759433 > > > Signed-off-by: Mike Gilbert > > > --- > > > 聽eclass/meson.eclass | 3 ++- > > > 聽1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > > > index 21338280df33..6296f1dd26e5 100644 > > > --- a/eclass/meson.eclass > > > +++ b/eclass/meson.eclass > > > @@ -126,7 +126,8 @@ EOF > > > 聽#聽 '--unicode-16=饜惙', '--unicode-32=饜'] > > > 聽# > > > 聽_meson_env_array() { > > > -聽聽 python -c "${__MESON_ARRAY_PARSER}" "$@" > > > +聽聽 local python="$(eselect python show)" > > > +聽聽 ${python} -c "${__MESON_ARRAY_PARSER}" "$@" > > > 聽} > > > > > > 聽# @FUNCTION: _meson_get_machine_info > > > > You're missing a BDEPEND on app-eselect/eselect-python. > > > > Also, I really don't like these workarounds.聽 It takes a lot of > > effort > > to figure out how to break stuff, so people stop doing awful > > things. > > It's disrespectful to my time when you invent new hacks.聽 Now I'll > > have > > to figure out how to change eselect-python to break it. > > Why is this such an awful thing to do? > > The code should be able to execute with any version of python > currently supported by Gentoo. > > Please don't assume that I'm trying to avoid a proper solution here. > Please suggest a better alternative if you have one. I actually liked installing the script to the system. -- Best regards, Micha艂 G贸rny
Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
On Thu, Dec 17, 2020 at 4:44 PM Micha艂 G贸rny wrote: > > On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote: > > Closes: https://bugs.gentoo.org/759433 > > Signed-off-by: Mike Gilbert > > --- > > eclass/meson.eclass | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > > index 21338280df33..6296f1dd26e5 100644 > > --- a/eclass/meson.eclass > > +++ b/eclass/meson.eclass > > @@ -126,7 +126,8 @@ EOF > > # '--unicode-16=饜惙', '--unicode-32=饜'] > > # > > _meson_env_array() { > > - python -c "${__MESON_ARRAY_PARSER}" "$@" > > + local python="$(eselect python show)" > > + ${python} -c "${__MESON_ARRAY_PARSER}" "$@" > > } > > > > # @FUNCTION: _meson_get_machine_info > > You're missing a BDEPEND on app-eselect/eselect-python. > > Also, I really don't like these workarounds. It takes a lot of effort > to figure out how to break stuff, so people stop doing awful things. > It's disrespectful to my time when you invent new hacks. Now I'll have > to figure out how to change eselect-python to break it. Why is this such an awful thing to do? The code should be able to execute with any version of python currently supported by Gentoo. Please don't assume that I'm trying to avoid a proper solution here. Please suggest a better alternative if you have one.
Re: [gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
On Thu, 2020-12-17 at 16:30 -0500, Mike Gilbert wrote: > Closes: https://bugs.gentoo.org/759433 > Signed-off-by: Mike Gilbert > --- > 聽eclass/meson.eclass | 3 ++- > 聽1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/eclass/meson.eclass b/eclass/meson.eclass > index 21338280df33..6296f1dd26e5 100644 > --- a/eclass/meson.eclass > +++ b/eclass/meson.eclass > @@ -126,7 +126,8 @@ EOF > 聽#聽 '--unicode-16=饜惙', '--unicode-32=饜'] > 聽# > 聽_meson_env_array() { > -聽聽聽python -c "${__MESON_ARRAY_PARSER}" "$@" > +聽聽聽local python="$(eselect python show)" > +聽聽聽${python} -c "${__MESON_ARRAY_PARSER}" "$@" > 聽} > 聽 > 聽# @FUNCTION: _meson_get_machine_info You're missing a BDEPEND on app-eselect/eselect-python. Also, I really don't like these workarounds. It takes a lot of effort to figure out how to break stuff, so people stop doing awful things. It's disrespectful to my time when you invent new hacks. Now I'll have to figure out how to change eselect-python to break it. -- Best regards, Micha艂 G贸rny
[gentoo-dev] [PATCH 1/3] meson.eclass: use python eselect module in _meson_env_array
Closes: https://bugs.gentoo.org/759433 Signed-off-by: Mike Gilbert --- eclass/meson.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 21338280df33..6296f1dd26e5 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -126,7 +126,8 @@ EOF # '--unicode-16=饜惙', '--unicode-32=饜'] # _meson_env_array() { - python -c "${__MESON_ARRAY_PARSER}" "$@" + local python="$(eselect python show)" + ${python} -c "${__MESON_ARRAY_PARSER}" "$@" } # @FUNCTION: _meson_get_machine_info -- 2.30.0.rc0