diff --git a/SOURCES/0003-hide-some-errors.patch b/SOURCES/0003-hide-some-errors.patch new file mode 100644 index 0000000..437948d --- /dev/null +++ b/SOURCES/0003-hide-some-errors.patch @@ -0,0 +1,61 @@ +diff -up gnome-software-3.36.1/lib/gs-plugin-loader.c.12 gnome-software-3.36.1/lib/gs-plugin-loader.c +--- gnome-software-3.36.1/lib/gs-plugin-loader.c.12 2022-09-22 12:17:59.367881179 +0200 ++++ gnome-software-3.36.1/lib/gs-plugin-loader.c 2022-09-22 12:17:59.392881205 +0200 +@@ -333,10 +333,17 @@ gs_plugin_job_to_failed_event (GsPluginJ + + /* invalid */ + if (error->domain != GS_PLUGIN_ERROR) { +- g_warning ("not GsPlugin error %s:%i: %s", +- g_quark_to_string (error->domain), +- error->code, +- error->message); ++ if (g_strcmp0 (BUILD_TYPE, "debug") == 0) { ++ g_warning ("not GsPlugin error %s:%i: %s", ++ g_quark_to_string (error->domain), ++ error->code, ++ error->message); ++ } else { ++ g_debug ("not GsPlugin error %s:%i: %s", ++ g_quark_to_string (error->domain), ++ error->code, ++ error->message); ++ } + g_set_error_literal (&error_copy, + GS_PLUGIN_ERROR, + GS_PLUGIN_ERROR_FAILED, +diff -up gnome-software-3.36.1/meson.build.12 gnome-software-3.36.1/meson.build +--- gnome-software-3.36.1/meson.build.12 2022-09-22 12:18:09.900892043 +0200 ++++ gnome-software-3.36.1/meson.build 2022-09-22 12:18:19.311901744 +0200 +@@ -9,6 +9,7 @@ conf = configuration_data() + conf.set_quoted('VERSION', meson.project_version()) + conf.set_quoted('PACKAGE_NAME', meson.project_name()) + conf.set_quoted('PACKAGE_VERSION', meson.project_version()) ++conf.set_quoted('BUILD_TYPE', get_option('buildtype')) + + # this refers to the gnome-software plugin API version + # this is not in any way related to a package or soname version +diff -up gnome-software-3.36.1/src/gs-shell.c.12 gnome-software-3.36.1/src/gs-shell.c +--- gnome-software-3.36.1/src/gs-shell.c.12 2022-09-22 12:17:59.301881111 +0200 ++++ gnome-software-3.36.1/src/gs-shell.c 2022-09-22 12:17:59.392881205 +0200 +@@ -2044,10 +2044,17 @@ gs_shell_rescan_events (GsShell *shell) + !g_error_matches (error, + G_IO_ERROR, + G_IO_ERROR_CANCELLED)) { +- g_warning ("not handling error %s for action %s: %s", +- gs_plugin_error_to_string (error->code), +- gs_plugin_action_to_string (action), +- error->message); ++ if (g_strcmp0 (BUILD_TYPE, "debug") == 0) { ++ g_warning ("not handling error %s for action %s: %s", ++ gs_plugin_error_to_string (error->code), ++ gs_plugin_action_to_string (action), ++ error->message); ++ } else { ++ g_debug ("not handling error %s for action %s: %s", ++ gs_plugin_error_to_string (error->code), ++ gs_plugin_action_to_string (action), ++ error->message); ++ } + } + gs_plugin_event_add_flag (event, GS_PLUGIN_EVENT_FLAG_INVALID); + return; diff --git a/SPECS/gnome-software.spec b/SPECS/gnome-software.spec index 273f8bc..6f4af30 100644 --- a/SPECS/gnome-software.spec +++ b/SPECS/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.36.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -40,6 +40,7 @@ Patch7: crash-when-run-as-root.patch Patch8: gs-updates-page-keep-showing-installing-apps.patch Patch9: flatpak-same-runtime-origin.patch Patch10: devel-install-headers.patch +Patch11: 0003-hide-some-errors.patch BuildRequires: gcc BuildRequires: gettext @@ -114,7 +115,7 @@ These development files are for building gnome-software plugins outside the source tree. Most users do not need this subpackage installed. %prep -%autosetup -p1 +%autosetup -p1 -S gendiff %build %meson \ @@ -227,6 +228,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Thu Sep 22 2022 Milan Crha - 3.36.1-11 +- Resolves: #2124772 (Hide some errors in non-debug builds) + * Thu Jul 08 2021 Milan Crha - 3.36.1-10 - Resolves: #1978505 (Development package is missing important header files)