From 26470342a556b3ce333c948d5dbb49fc1cd42611 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 15 Jul 2026 14:20:20 +0100 Subject: [PATCH] Fix building the silo when shared-mime-info is installed shared-mime-info 2.5.1 added a `application/x-freedesktop-appstream-component` that is a subclass of `application/xml` -- which breaks the explicit content type checks in the source builder. Abort the loop for any XML subclass instead to cover both cases. Fixes: https://github.com/hughsie/libxmlb/issues/325 --- src/xb-builder-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xb-builder-source.c b/src/xb-builder-source.c index 19672876..5110c3d6 100644 --- a/src/xb-builder-source.c +++ b/src/xb-builder-source.c @@ -469,7 +469,7 @@ xb_builder_source_get_istream(XbBuilderSource *self, GCancellable *cancellable, g_debug("detected content type of %s to be %s", basename, content_type); if (content_type == NULL) return NULL; - if (g_strcmp0(content_type, "application/xml") == 0) + if (g_content_type_is_a(content_type, "application/xml")) break; /* Also accept the text/xml alias, just in case the user’s content-type database is * slightly broken (application/xml should normally be what’s used): */