[gnome-build-meta/valentindavid/ostree-workaround] ostree: Work around issue with newer glib
- From: Valentin David <valentindavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/valentindavid/ostree-workaround] ostree: Work around issue with newer glib
- Date: Wed, 3 Nov 2021 16:32:11 +0000 (UTC)
commit 06256c50697c8c46e02ac727ae0125cca8091091
Author: Valentin David <me valentindavid com>
Date: Tue Nov 2 19:46:03 2021 +0100
ostree: Work around issue with newer glib
A new assert in glib breaks a broken call to `g_file_get_child`
Fixes #447
elements/core-deps/libostree.bst | 2 ++
files/ostree/glib-absolute-subpath.patch | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/elements/core-deps/libostree.bst b/elements/core-deps/libostree.bst
index 192b46321..a1fd476c8 100644
--- a/elements/core-deps/libostree.bst
+++ b/elements/core-deps/libostree.bst
@@ -5,6 +5,8 @@ sources:
url: github_com:ostreedev/ostree/releases/download/v2021.5/libostree-2021.5.tar.xz
- kind: patch
path: files/ostree/no-boot-symlink.patch
+- kind: patch
+ path: files/ostree/glib-absolute-subpath.patch
build-depends:
- sdk/gobject-introspection.bst
diff --git a/files/ostree/glib-absolute-subpath.patch b/files/ostree/glib-absolute-subpath.patch
new file mode 100644
index 000000000..382eb991f
--- /dev/null
+++ b/files/ostree/glib-absolute-subpath.patch
@@ -0,0 +1,18 @@
+diff -ur ostree.old/src/libostree/ostree-repo-checkout.c ostree/src/libostree/ostree-repo-checkout.c
+--- ostree.old/src/libostree/ostree-repo-checkout.c 2021-08-30 19:35:53.000000000 +0200
++++ ostree/src/libostree/ostree-repo-checkout.c 2021-11-03 17:31:18.060812066 +0100
+@@ -1388,10 +1388,11 @@
+
+ g_autoptr(GFile) target_dir = NULL;
+
+- if (strcmp (options->subpath, "/") != 0)
+- target_dir = g_file_get_child (commit_root, options->subpath);
+- else
++ if (strcmp (options->subpath, "/") != 0) {
++ target_dir = g_file_resolve_relative_path (commit_root, g_path_skip_root (options->subpath));
++ } else {
+ target_dir = g_object_ref (commit_root);
++ }
+ g_autoptr(GFileInfo) target_info =
+ g_file_query_info (target_dir, OSTREE_GIO_FAST_QUERYINFO,
+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]