Skip to content

Commit

Permalink
[glib] Replace g_critical in g_source_remove with g_warning. Contribu…
Browse files Browse the repository at this point in the history
…tes to JB#35380

glib 2.39 and later calls g_critical from g_source_remove() if it's called
with invalid source id. Even though it's a programming error, in most cases
it's not fatal.
  • Loading branch information
monich committed May 30, 2016
1 parent 382f3bf commit e30b9a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rpm/glib-replace-some-criticals-with-warnings.patch
@@ -0,0 +1,13 @@
diff --git a/glib/gmain.c b/glib/gmain.c
index 29ccee0..79e4fa6 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2281,7 +2281,7 @@ g_source_remove (guint tag)
if (source)
g_source_destroy (source);
else
- g_critical ("Source ID %u was not found when attempting to remove it", tag);
+ g_warning ("Source ID %u was not found when attempting to remove it", tag);

return source != NULL;
}
3 changes: 3 additions & 0 deletions rpm/glib2.spec
Expand Up @@ -15,6 +15,7 @@ Source4: %{name}-rpmlintrc
Patch1: glib-syslog-message-handler.patch
Patch2: 0001-Add-dev-mmcblk-to-the-list-of-devices-to-be-detected.patch
Patch3: use-mtab-instead-of-fstab.patch
Patch4: glib-replace-some-criticals-with-warnings.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libpcre)
Expand Down Expand Up @@ -66,6 +67,8 @@ version 2 of the GLib library.
%patch2 -p1
# use-mtab-instead-of-fstab.patch
%patch3 -p1
# glib-replace-some-criticals-with-warnings.patch
%patch4 -p1

%build
# >> build pre
Expand Down

0 comments on commit e30b9a6

Please sign in to comment.