[gnome-builder] pipeline: strip prefix from some messages
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] pipeline: strip prefix from some messages
- Date: Sat, 25 Nov 2017 21:42:55 +0000 (UTC)
commit 89851a718c0788315004af767f3725177f75f10d
Author: Christian Hergert <chergert redhat com>
Date: Sat Nov 25 13:42:43 2017 -0800
pipeline: strip prefix from some messages
If we get a message from flatpak-builder or jhbuild, just strip their
prefix. I'm not thrilled about having this layer violation, but it is
both faster and less annoying than plumbing something in for plugins
to add this check themselves.
src/libide/buildsystem/ide-build-pipeline.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 127468d..e9fc641 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -3023,6 +3023,20 @@ _ide_build_pipeline_set_message (IdeBuildPipeline *self,
{
g_return_if_fail (IDE_IS_BUILD_PIPELINE (self));
+ if (message != NULL)
+ {
+ /*
+ * Special case to deal with messages coming from systems we
+ * know prefix the build tooling information to the message.
+ * It's easier to just do this here rather than provide some
+ * sort of API for plugins to do this for us.
+ */
+ if (g_str_has_prefix (message, "flatpak-builder: "))
+ message += strlen ("flatpak-builder: ");
+ else if (g_str_has_prefix (message, "jhbuild:"))
+ message += strlen ("jhbuild:");
+ }
+
if (!ide_str_equal0 (message, self->message))
{
g_free (self->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]