Blame SOURCES/0001-Only-include-the-attribute-not-exported-warning-on-d.patch

75fbaf
From 19db23f9b8a64597564ce1b474eb6c384a57125f Mon Sep 17 00:00:00 2001
75fbaf
From: Richard Hughes <richard@hughsie.com>
75fbaf
Date: Wed, 2 Nov 2022 09:31:53 +0000
75fbaf
Subject: [PATCH] Only include the 'attribute not exported' warning on debug
75fbaf
 builds
75fbaf
75fbaf
End users are not really capable of fixing the root issue, and people seem
75fbaf
overly worried that something bad has gone wrong.
75fbaf
75fbaf
Fixes https://github.com/fwupd/fwupd/issues/5077
75fbaf
---
75fbaf
 libfwupdplugin/fu-bios-settings.c      | 2 +-
75fbaf
 libfwupdplugin/fu-self-test.c          | 2 ++
75fbaf
 plugins/lenovo-thinklmi/fu-self-test.c | 2 ++
75fbaf
 3 files changed, 5 insertions(+), 1 deletion(-)
75fbaf
75fbaf
diff --git a/libfwupdplugin/fu-bios-settings.c b/libfwupdplugin/fu-bios-settings.c
75fbaf
index 6151c8289..8ea1269d7 100644
75fbaf
--- a/libfwupdplugin/fu-bios-settings.c
75fbaf
+++ b/libfwupdplugin/fu-bios-settings.c
75fbaf
@@ -276,7 +276,7 @@ fu_bios_setting_set_type(FuBiosSettings *self, FwupdBiosSetting *attr, GError **
75fbaf
 
75fbaf
 	/* lenovo thinklmi seems to be missing it even though it's mandatory :/ */
75fbaf
 	if (!fu_bios_setting_get_key(attr, "type", &data, &error_key)) {
75fbaf
-#if GLIB_CHECK_VERSION(2, 64, 0)
75fbaf
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
75fbaf
 		g_warning_once("KERNEL BUG: 'type' attribute not exported: (%s)",
75fbaf
 			       error_key->message);
75fbaf
 #else
75fbaf
diff --git a/libfwupdplugin/fu-self-test.c b/libfwupdplugin/fu-self-test.c
75fbaf
index c105fa271..c670b3a80 100644
75fbaf
--- a/libfwupdplugin/fu-self-test.c
75fbaf
+++ b/libfwupdplugin/fu-self-test.c
75fbaf
@@ -3117,7 +3117,9 @@ fu_bios_settings_load_func(void)
75fbaf
 	test_dir = g_test_build_filename(G_TEST_DIST, "tests", "bios-attrs", "lenovo-p620", NULL);
75fbaf
 	(void)g_setenv("FWUPD_SYSFSFWATTRIBDIR", test_dir, TRUE);
75fbaf
 
75fbaf
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
75fbaf
 	g_test_expect_message("FuBiosSettings", G_LOG_LEVEL_WARNING, "*BUG*");
75fbaf
+#endif
75fbaf
 	ret = fu_context_reload_bios_settings(ctx, &error);
75fbaf
 	g_assert_no_error(error);
75fbaf
 	g_assert_true(ret);
75fbaf
diff --git a/plugins/lenovo-thinklmi/fu-self-test.c b/plugins/lenovo-thinklmi/fu-self-test.c
75fbaf
index 4777a2ae1..9e20a8cf5 100644
75fbaf
--- a/plugins/lenovo-thinklmi/fu-self-test.c
75fbaf
+++ b/plugins/lenovo-thinklmi/fu-self-test.c
75fbaf
@@ -39,7 +39,9 @@ fu_test_self_init(FuTest *self, GError **error_global)
75fbaf
 	g_autoptr(FuProgress) progress = fu_progress_new(G_STRLOC);
75fbaf
 	g_autoptr(GError) error = NULL;
75fbaf
 
75fbaf
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
75fbaf
 	g_test_expect_message("FuBiosSettings", G_LOG_LEVEL_WARNING, "*KERNEL*BUG*");
75fbaf
+#endif
75fbaf
 
75fbaf
 	ret = fu_context_load_quirks(ctx,
75fbaf
 				     FU_QUIRKS_LOAD_FLAG_NO_CACHE | FU_QUIRKS_LOAD_FLAG_NO_VERIFY,
75fbaf
-- 
75fbaf
2.39.1
75fbaf