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

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