($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] libportal: fix rare build race
Date: Fri, 10 May 2024 15:45:35 +0000	[thread overview]
Message-ID: <20240510154535.1409497-1-ross.burton@arm.com> (raw)

There is a build race where the libportal.vapi is not always generated
before it is needed to build libportal-gtk*.vapi. Backport the fix from
upstream.

[ YOCTO #15479 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...build-race-when-building-GTK-vapi-fi.patch | 49 +++++++++++++++++++
 .../libportal/libportal_0.7.1.bb              |  3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch

diff --git a/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch b/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch
new file mode 100644
index 00000000000..fb015d36326
--- /dev/null
+++ b/meta/recipes-gnome/libportal/files/0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch
@@ -0,0 +1,49 @@
+From 26f96a178f8a0afded00bdd7238728c0b6e42a6b Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 9 May 2024 18:44:41 +0000
+Subject: [PATCH] meson.build: fix build race when building GTK vapi files
+
+There's a build race when building the GTK vapi files:
+
+FAILED: libportal/libportal-gtk4.vapi
+error: Package `libportal' not found in specified Vala API directories or GObject-Introspection GIR directories
+
+This can be verified by adding "sleep 10;" to the command for the
+libportal/libportal.vapi target in the generated build.ninja file.
+
+The GTK vapi files need to have access to the generic libportal.vapi file,
+but there is no explicit dependency.  Switch the dependency name 'libportal'
+to the dependency object libportal_vapi so that Meson generates the
+dependency correctly.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ libportal/meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libportal/meson.build b/libportal/meson.build
+index fff7603..4e67f40 100644
+--- a/libportal/meson.build
++++ b/libportal/meson.build
+@@ -168,7 +168,7 @@ if gtk3_dep.found()
+     if vapi
+       libportal_gtk3_vapi = gnome.generate_vapi('libportal-gtk3',
+         sources: libportal_gtk3_gir[0],
+-        packages: ['gio-2.0', 'gtk+-3.0', 'libportal'],
++        packages: ['gio-2.0', 'gtk+-3.0', libportal_vapi],
+         gir_dirs: [meson.current_build_dir()],
+         vapi_dirs: [meson.current_build_dir()],
+         install: true,
+@@ -227,7 +227,7 @@ if gtk4_dep.found()
+     if vapi
+       libportal_gtk4_vapi = gnome.generate_vapi('libportal-gtk4',
+         sources: libportal_gtk4_gir[0],
+-        packages: ['gio-2.0', 'gtk4', 'libportal'],
++        packages: ['gio-2.0', 'gtk4', libportal_vapi],
+         gir_dirs: [meson.current_build_dir()],
+         vapi_dirs: [meson.current_build_dir()],
+         install: true,
+-- 
+2.34.1
+
diff --git a/meta/recipes-gnome/libportal/libportal_0.7.1.bb b/meta/recipes-gnome/libportal/libportal_0.7.1.bb
index 22e45559c96..6ddfef76d34 100644
--- a/meta/recipes-gnome/libportal/libportal_0.7.1.bb
+++ b/meta/recipes-gnome/libportal/libportal_0.7.1.bb
@@ -6,7 +6,8 @@ BUGTRACKER = "https://github.com/flatpak/libportal/issues"
 LICENSE = "LGPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3000208d539ec061b899bce1d9ce9404"
 
-SRC_URI = "git://github.com/flatpak/${BPN}.git;protocol=https;branch=main"
+SRC_URI = "git://github.com/flatpak/${BPN}.git;protocol=https;branch=main \
+           file://0001-meson.build-fix-build-race-when-building-GTK-vapi-fi.patch"
 SRCREV = "e9ed3a50cdde321eaf42361212480a66eb94a57a"
 S = "${WORKDIR}/git"
 
-- 
2.34.1



                 reply	other threads:[~2024-05-10 15:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240510154535.1409497-1-ross.burton@arm.com \
    --to=ross.burton@arm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).