On Fri, Dec 11, 2020 at 06:17:42PM -0500, Mike Gilbert wrote: > Bug: https://bugs.gentoo.org/759433 > Signed-off-by: Mike Gilbert <[email protected]> > --- > dev-util/meson/files/meson-array | 18 ++++++++++++++++++ > ...on-0.55.3.ebuild => meson-0.55.3-r1.ebuild} | 5 +++++ > dev-util/meson/meson-9999.ebuild | 5 +++++ > 3 files changed, 28 insertions(+) > create mode 100644 dev-util/meson/files/meson-array > rename dev-util/meson/{meson-0.55.3.ebuild => meson-0.55.3-r1.ebuild} (96%) > > diff --git a/dev-util/meson/files/meson-array > b/dev-util/meson/files/meson-array > new file mode 100644 > index 000000000000..0f4e8c7c6389 > --- /dev/null > +++ b/dev-util/meson/files/meson-array > @@ -0,0 +1,18 @@ > +#!/usr/bin/env python > + > +import itertools > +import shlex > +import sys > + > +def quote(s): > + return "'" + s.replace("\\", "\\\\").replace("'", "\\'") + "'" > + > +def main(): > + args = sys.argv[1:] > + args = (shlex.split(x) for x in args) > + args = itertools.chain.from_iterable(args) > + args = (quote(x) for x in args) > + print("[" + ", ".join(args) + "]") > + > +if __name__ == "__main__": > + main() > diff --git a/dev-util/meson/meson-0.55.3.ebuild > b/dev-util/meson/meson-0.55.3-r1.ebuild > similarity index 96% > rename from dev-util/meson/meson-0.55.3.ebuild > rename to dev-util/meson/meson-0.55.3-r1.ebuild > index ddf27ccdc725..4708a46b324f 100644 > --- a/dev-util/meson/meson-0.55.3.ebuild > +++ b/dev-util/meson/meson-0.55.3-r1.ebuild > @@ -82,6 +82,11 @@ python_test() { > ) || die "Testing failed with ${EPYTHON}" > } > > +python_install() { > + distutils-r1_python_install > + python_doscript "${FILESDIR}/meson-array" > +} > + > python_install_all() { > distutils-r1_python_install_all > > diff --git a/dev-util/meson/meson-9999.ebuild > b/dev-util/meson/meson-9999.ebuild > index 38ccf9179e21..1cdd142a3f79 100644 > --- a/dev-util/meson/meson-9999.ebuild > +++ b/dev-util/meson/meson-9999.ebuild > @@ -82,6 +82,11 @@ python_test() { > ) || die "Testing failed with ${EPYTHON}" > } > > +python_install() { > + distutils-r1_python_install > + python_doscript "${FILESDIR}/meson-array" > +} > + > python_install_all() { > distutils-r1_python_install_all > > -- > 2.29.2
I am fully aware I don't have full context for this, so fill me in if I am missing something. Reading this patch series and the bug linked in this message, it looks like we are trying to make meson.eclass work if /usr/bin/python is missing. My question is why? as far as I know /usr/bin/python is standard like /bin/sh; when a version of python is installed this link is always available. If /usr/bin/python is going away, it is going to break not only this but every python script that has "#!/usr/bin/python" or "#!/usr/bin/env python" as a shebang line. If /usr/bin/python is going away, what about /usr/bin/python3? If that isn't going away, the easier thing to do is to tweak the eclass to call it instead. If both /usr/bin/python and /usr/bin/python3 are going away, the best choice would be to add functionality to python-exec or eselect python to tell us the path to the default python interpretor. Once we know that we call it directly. Please do not apply this patch to meson; I think we can figure something out that is better. Also, see my comments on the third patch in the series for more context. Thanks, William
signature.asc
Description: PGP signature
