From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 40DF41584AD for ; Sat, 03 May 2025 06:04:26 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 2C66634309C for ; Sat, 03 May 2025 06:04:26 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 273A2110287; Sat, 03 May 2025 06:04:25 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 1BC3D110287 for ; Sat, 03 May 2025 06:04:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2F05343093 for ; Sat, 03 May 2025 06:04:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3454C1E87 for ; Sat, 03 May 2025 06:04:23 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1746252236.affeb848635ad4451be3eaf7230d65bc84c2e5c6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/glib/glib-2.80.5-r1.ebuild dev-libs/glib/glib-2.82.5.ebuild dev-libs/glib/glib-2.84.0.ebuild dev-libs/glib/glib-2.84.1.ebuild X-VCS-Directories: dev-libs/glib/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: affeb848635ad4451be3eaf7230d65bc84c2e5c6 X-VCS-Branch: master Date: Sat, 03 May 2025 06:04:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dcfc3984-31c4-4354-8d69-4e03334f7db6 X-Archives-Hash: 319d78c6a0fe2690b8fe7ffb78a57ce2 commit: affeb848635ad4451be3eaf7230d65bc84c2e5c6 Author: Sam James gentoo org> AuthorDate: Sat May 3 05:59:55 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 3 06:03:56 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=affeb848 dev-libs/glib: check that non-bootstrap gobject-introspection works Right now, we don't depend on dev-libs/gobject-introspection to avoid the circular dependency and we do a has_version check to see if we need to bootstrap it if it isn't installed. On the binhost, we had a failure like: ``` FAILED: girepository/introspection/GLib-2.0.gir [...] Traceback (most recent call last): File "/usr/bin/g-ir-scanner", line 99, in from giscanner.utils import dll_dirs File "/usr/lib64/gobject-introspection/giscanner/utils.py", line 385, in import distutils.cygwinccompiler ModuleNotFoundError: No module named 'distutils' [...] ninja: build stopped: subcommand failed. * ERROR: dev-libs/glib-2.82.5::gentoo failed (compile phase): ``` That's because we automagically used the installed gobject-introspection's g-ir-scanner which doesn't yet have *its* setuptools dependency satisfied (or hasn't been rebuilt for the same Python impl that setuptools has been) but Portage doesn't know that dev-libs/glib uses gobject-introspection, so it doesn't see the need to rebuild it yet. Workaround this (fix it, really) by checking `g-ir-scanner --version` doesn't crash. This may end up fixing bug #951487 too (which is a separate problem). (If it doesn't fix bug #951487, we can go further and do a has_version vs --version check here, just care will be needed to sanitise the --version output before passing it into has_version. Or perhaps best_version and a glob would work better.) Bug: https://bugs.gentoo.org/951487 Signed-off-by: Sam James gentoo.org> dev-libs/glib/glib-2.80.5-r1.ebuild | 19 ++++++++++++++++++- dev-libs/glib/glib-2.82.5.ebuild | 19 ++++++++++++++++++- dev-libs/glib/glib-2.84.0.ebuild | 19 ++++++++++++++++++- dev-libs/glib/glib-2.84.1.ebuild | 19 ++++++++++++++++++- 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/dev-libs/glib/glib-2.80.5-r1.ebuild b/dev-libs/glib/glib-2.80.5-r1.ebuild index fb26093bb425..d25a34d1332e 100644 --- a/dev-libs/glib/glib-2.80.5-r1.ebuild +++ b/dev-libs/glib/glib-2.80.5-r1.ebuild @@ -223,8 +223,25 @@ multilib_src_configure() { #esac #fi + _need_bootstrap_gi() { + if ! multilib_native_use introspection ; then + return 1 + fi + + if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + return 0 + fi + + # Is the installed gobject-introspection usable? + if ! g-ir-scanner --version &> /dev/null ; then + return 0 + fi + + return 1 + } + # Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only) - if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + if _need_bootstrap_gi ; then einfo "Bootstrapping gobject-introspection..." INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin" INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)" diff --git a/dev-libs/glib/glib-2.82.5.ebuild b/dev-libs/glib/glib-2.82.5.ebuild index b16e62189f6a..947b237fc6d3 100644 --- a/dev-libs/glib/glib-2.82.5.ebuild +++ b/dev-libs/glib/glib-2.82.5.ebuild @@ -211,8 +211,25 @@ multilib_src_configure() { #esac #fi + _need_bootstrap_gi() { + if ! multilib_native_use introspection ; then + return 1 + fi + + if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + return 0 + fi + + # Is the installed gobject-introspection usable? + if ! g-ir-scanner --version &> /dev/null ; then + return 0 + fi + + return 1 + } + # Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only) - if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + if _need_bootstrap_gi ; then einfo "Bootstrapping gobject-introspection..." INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin" INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)" diff --git a/dev-libs/glib/glib-2.84.0.ebuild b/dev-libs/glib/glib-2.84.0.ebuild index 8ec0a9d7d48d..b0868a11de27 100644 --- a/dev-libs/glib/glib-2.84.0.ebuild +++ b/dev-libs/glib/glib-2.84.0.ebuild @@ -215,8 +215,25 @@ multilib_src_configure() { #esac #fi + _need_bootstrap_gi() { + if ! multilib_native_use introspection ; then + return 1 + fi + + if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + return 0 + fi + + # Is the installed gobject-introspection usable? + if ! g-ir-scanner --version &> /dev/null ; then + return 0 + fi + + return 1 + } + # Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only) - if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + if _need_bootstrap_gi ; then einfo "Bootstrapping gobject-introspection..." INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin" INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)" diff --git a/dev-libs/glib/glib-2.84.1.ebuild b/dev-libs/glib/glib-2.84.1.ebuild index e5e5ff280c0f..696388556f39 100644 --- a/dev-libs/glib/glib-2.84.1.ebuild +++ b/dev-libs/glib/glib-2.84.1.ebuild @@ -216,8 +216,25 @@ multilib_src_configure() { #esac #fi + _need_bootstrap_gi() { + if ! multilib_native_use introspection ; then + return 1 + fi + + if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + return 0 + fi + + # Is the installed gobject-introspection usable? + if ! g-ir-scanner --version &> /dev/null ; then + return 0 + fi + + return 1 + } + # Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only) - if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then + if _need_bootstrap_gi ; then einfo "Bootstrapping gobject-introspection..." INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin" INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"