dev-lang/python-exec[-native-symlinks] breaks dev-util/meson because "python" is called directly. Reproducible: Always Actual Results: # emerge --oneshot games-board/gnome-mahjongg Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) games-board/gnome-mahjongg-3.36.2::gentoo * gnome-mahjongg-3.36.2.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking gnome-mahjongg-3.36.2.tar.xz to /tmp/portage/games-board/gnome-mahjongg-3.36.2/work >>> Source unpacked in /tmp/portage/games-board/gnome-mahjongg-3.36.2/work >>> Preparing source in /tmp/portage/games-board/gnome-mahjongg-3.36.2/work/gnome-mahjongg-3.36.2 ... >>> Source prepared. >>> Configuring source in /tmp/portage/games-board/gnome-mahjongg-3.36.2/work/gnome-mahjongg-3.36.2 ... /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/environment: line 471: python: command not found meson setup --buildtype plain --libdir lib64 --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/share/pkgconfig --pkg-config-path /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/share/pkgconfig --native-file /tmp/portage/games-board/gnome-mahjongg-3.36.2/temp/meson.x86_64-pc-linux-gnu.amd64.ini /tmp/portage/games-board/gnome-mahjongg-3.36.2/work/gnome-mahjongg-3.36.2 /tmp/portage/games-board/gnome-mahjongg-3.36.2/work/gnome-mahjongg-3.36.2-build Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mesonbuild/mesonmain.py", line 140, in run return options.run_func(options) File "/usr/lib/python3.9/site-packages/mesonbuild/msetup.py", line 245, in run app.generate() File "/usr/lib/python3.9/site-packages/mesonbuild/msetup.py", line 154, in generate env = environment.Environment(self.source_dir, self.build_dir, self.options) File "/usr/lib/python3.9/site-packages/mesonbuild/environment.py", line 579, in __init__ config = coredata.parse_machine_files(self.coredata.config_files) File "/usr/lib/python3.9/site-packages/mesonbuild/coredata.py", line 944, in parse_machine_files parser = MachineFileParser(filenames) File "/usr/lib/python3.9/site-packages/mesonbuild/coredata.py", line 899, in __init__ self.sections[s] = self._parse_section(s) File "/usr/lib/python3.9/site-packages/mesonbuild/coredata.py", line 911, in _parse_section res = self._evaluate_statement(ast.lines[0]) IndexError: list index out of range * ERROR: games-board/gnome-mahjongg-3.36.2::gentoo failed (configure phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called src_configure * environment, line 2688: Called meson_src_configure * environment, line 1956: Called die * The specific snippet of code: * "${mesonargs[@]}" ) || die * Other packages using meson give the same results.
It's going to break a lot of things, it's a flag more intended for internal testing. Any reason it isn't in package.use.force like binutils/gcc-config's native-symlinks flags?
(In reply to Ionen Wolkens from comment #1) > It's going to break a lot of things ... I think that is the plan. Anyways, dev-util/meson should be one of the first ones to get fixed because it affects so many other packages.
(In reply to cyrillic from comment #2) > (In reply to Ionen Wolkens from comment #1) > > It's going to break a lot of things ... > > I think that is the plan. > Anyways, dev-util/meson should be one of the first ones to get fixed because > it affects so many other packages. I see, given summary started with python-exec it made it look like you were filling this against python-exec rather than meson.
The issue seems to be in meson.eclass, specifically the _meson_env_array function which calls python directly. I don't really have any intention of "fixing" this unless someone comes up with a clever solution.
We could solve this by installing a python-exec compatible script instead of calling python with an inline program. Patch sent to gentoo-dev for review.
As I said on the ml, I'm strongly against this use flag in dev-lang/python-exec unless upstream python is going the way of removing /usr/bin/python from its native builds. If upstream python is not doing this, we shouldn't in Gentoo either. On the other hand, if they are moving toward this, I agree we should start figuring out a plan.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=496198d0ab1971e26e01129cff736fb4073739b8 commit 496198d0ab1971e26e01129cff736fb4073739b8 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-12-28 22:24:09 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-12-28 22:34:16 +0000 meson.eclass: use meson-format-array Closes: https://bugs.gentoo.org/759433 Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/meson.eclass | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e391ef7abaf60b6a6966121a586b6e69b43f080 commit 3e391ef7abaf60b6a6966121a586b6e69b43f080 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-12-28 22:22:14 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-12-28 22:32:58 +0000 dev-util/meson-format-array: new package Bug: https://bugs.gentoo.org/759433 Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../meson-format-array/files/meson-format-array | 24 ++++++++++++++++++++++ .../meson-format-array/meson-format-array-0.ebuild | 22 ++++++++++++++++++++ dev-util/meson-format-array/metadata.xml | 8 ++++++++ 3 files changed, 54 insertions(+)