general: Remove trailing \n from GLib log messages

The GLib logging framework automatically appends a \n to messages, so it
doesn’t need to be added by callers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
tingping/wmclass
Philip Withnall 2017-07-07 15:10:27 +01:00
parent 315edcfc41
commit 81301f0ef4
13 changed files with 33 additions and 33 deletions

View File

@ -150,7 +150,7 @@ export_dir (int source_parent_fd,
else
{
source_printable = g_build_filename (source_relpath, dent->d_name, NULL);
g_debug ("Not exporting non-regular file %s\n", source_printable);
g_debug ("Not exporting non-regular file %s", source_printable);
}
}

View File

@ -132,7 +132,7 @@ flatpak_builtin_ls_remote (int argc, char **argv, GCancellable *cancellable, GEr
parts = flatpak_decompose_ref (ref, NULL);
if (parts == NULL)
{
g_debug ("Invalid remote ref %s\n", ref);
g_debug ("Invalid remote ref %s", ref);
continue;
}

View File

@ -808,7 +808,7 @@ main (int argc,
if (!builder_gc (cache, &error))
{
g_warning ("Failed to GC build cache: %s\n", error->message);
g_warning ("Failed to GC build cache: %s", error->message);
g_clear_error (&error);
}

View File

@ -1189,7 +1189,7 @@ builder_module_ensure_writable (BuilderModule *self,
const char *path = key;
g_autoptr(GFile) dest = g_file_resolve_relative_path (app_dir, path);
g_debug ("Breaking hardlink %s\n", path);
g_debug ("Breaking hardlink %s", path);
if (!flatpak_break_hardlink (dest, error))
return FALSE;
}

View File

@ -1340,7 +1340,7 @@ builder_get_debuginfo_file_references (const char *filename, GError **error)
return NULL;
if (elf_end (elf) < 0)
g_warning ("elf_end failed: %s\n", elf_errmsg (elf_errno ()));
g_warning ("elf_end failed: %s", elf_errmsg (elf_errno ()));
res = (char **) g_hash_table_get_keys_as_array (files, NULL);
g_hash_table_steal_all (files);
@ -1702,6 +1702,6 @@ builder_serializable_find_property_with_error (JsonSerializable *serializable,
GParamSpec *pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (serializable), name);
if (pspec == NULL &&
!g_str_has_prefix (name, "x-"))
g_warning ("Unknown property %s for type %s\n", name, g_type_name_from_instance ((GTypeInstance *)serializable));
g_warning ("Unknown property %s for type %s", name, g_type_name_from_instance ((GTypeInstance *)serializable));
return pspec;
}

View File

@ -381,7 +381,7 @@ append_locations_from_config_file (GPtrArray *locations,
if (!g_key_file_load_from_file (keyfile, file_path, G_KEY_FILE_NONE, &my_error))
{
g_debug ("Could not get list of system installations: %s\n", my_error->message);
g_debug ("Could not get list of system installations: %s", my_error->message);
g_propagate_error (error, g_steal_pointer (&my_error));
goto out;
}
@ -414,7 +414,7 @@ append_locations_from_config_file (GPtrArray *locations,
path = g_key_file_get_string (keyfile, groups[i], "Path", &my_error);
if (path == NULL)
{
g_debug ("Unable to get path for installation '%s': %s\n", id, my_error->message);
g_debug ("Unable to get path for installation '%s': %s", id, my_error->message);
g_propagate_error (error, g_steal_pointer (&my_error));
goto out;
}
@ -667,7 +667,7 @@ flatpak_dir_get_system_helper (FlatpakDir *self)
NULL, &error);
if (error != NULL)
{
g_warning ("Can't find org.freedesktop.Flatpak.SystemHelper: %s\n", error->message);
g_warning ("Can't find org.freedesktop.Flatpak.SystemHelper: %s", error->message);
system_helper = NO_SYSTEM_HELPER;
}
else
@ -1654,7 +1654,7 @@ flatpak_dir_deploy_appstream (FlatpakDir *self,
{
old_checkout_dir = g_file_get_child (arch_dir, old_checksum);
if (!flatpak_rm_rf (old_checkout_dir, cancellable, &tmp_error))
g_warning ("Unable to remove old appstream checkout: %s\n", tmp_error->message);
g_warning ("Unable to remove old appstream checkout: %s", tmp_error->message);
}
if (!g_file_replace_contents (timestamp_file, "", 0, NULL, FALSE,
@ -2396,7 +2396,7 @@ flatpak_dir_mirror_oci (FlatpakDir *self,
oci_pull_init_progress (progress);
g_debug ("Mirroring OCI image %s\n", oci_digest);
g_debug ("Mirroring OCI image %s", oci_digest);
res = flatpak_mirror_image_from_oci (dst_registry, registry, oci_digest, signature_digest, oci_pull_progress_cb,
progress, cancellable, error);
@ -2494,7 +2494,7 @@ flatpak_dir_pull_oci (FlatpakDir *self,
oci_pull_init_progress (progress);
g_debug ("Pulling OCI image %s\n", oci_digest);
g_debug ("Pulling OCI image %s", oci_digest);
checksum = flatpak_pull_from_oci (repo, registry, oci_digest, FLATPAK_OCI_MANIFEST (versioned),
remote, ref, signature_digest, oci_pull_progress_cb, progress, cancellable, error);
@ -2505,7 +2505,7 @@ flatpak_dir_pull_oci (FlatpakDir *self,
if (checksum == NULL)
return FALSE;
g_debug ("Imported OCI image as checksum %s\n", checksum);
g_debug ("Imported OCI image as checksum %s", checksum);
return TRUE;
}
@ -6179,7 +6179,7 @@ flatpak_dir_undeploy (FlatpakDir *self,
if (!flatpak_rm_rf (removed_subdir, cancellable, &tmp_error))
{
g_warning ("Unable to remove old checkout: %s\n", tmp_error->message);
g_warning ("Unable to remove old checkout: %s", tmp_error->message);
g_error_free (tmp_error);
}
}
@ -6302,7 +6302,7 @@ flatpak_dir_cleanup_removed (FlatpakDir *self,
GError *tmp_error = NULL;
if (!flatpak_rm_rf (child, cancellable, &tmp_error))
{
g_warning ("Unable to remove old checkout: %s\n", tmp_error->message);
g_warning ("Unable to remove old checkout: %s", tmp_error->message);
g_error_free (tmp_error);
}
}
@ -6764,7 +6764,7 @@ flatpak_dir_remote_has_ref (FlatpakDir *self,
summary = fetch_remote_summary_file (self, remote, NULL, NULL, &local_error);
if (summary == NULL)
{
g_debug ("Can't get summary for remote %s: %s\n", remote, local_error->message);
g_debug ("Can't get summary for remote %s: %s", remote, local_error->message);
return FALSE;
}

View File

@ -2736,7 +2736,7 @@ export_paths_export_context (FlatpakContext *context,
if (!get_xdg_user_dir_from_string (filesystem, &config_key, &rest, &path))
{
g_warning ("Unsupported xdg dir %s\n", filesystem);
g_warning ("Unsupported xdg dir %s", filesystem);
continue;
}
@ -2748,7 +2748,7 @@ export_paths_export_context (FlatpakContext *context,
/* xdg-user-dirs sets disabled dirs to $HOME, and its in general not a good
idea to set full access to $HOME other than explicitly, so we ignore
these */
g_debug ("Xdg dir %s is $HOME (i.e. disabled), ignoring\n", filesystem);
g_debug ("Xdg dir %s is $HOME (i.e. disabled), ignoring", filesystem);
continue;
}
@ -2788,7 +2788,7 @@ export_paths_export_context (FlatpakContext *context,
}
else
{
g_warning ("Unexpected filesystem arg %s\n", filesystem);
g_warning ("Unexpected filesystem arg %s", filesystem);
}
}
@ -3070,7 +3070,7 @@ flatpak_run_add_environment_args (GPtrArray *argv_array,
{
/* We still run along even if we don't get a cgroup, as nothing
really depends on it. Its just nice to have */
g_debug ("Failed to run in transient scope: %s\n", my_error->message);
g_debug ("Failed to run in transient scope: %s", my_error->message);
g_clear_error (&my_error);
}
@ -3689,7 +3689,7 @@ add_document_portal_args (GPtrArray *argv_array,
{
if (g_dbus_message_to_gerror (reply, &local_error))
{
g_message ("Can't get document portal: %s\n", local_error->message);
g_message ("Can't get document portal: %s", local_error->message);
}
else
{
@ -4456,7 +4456,7 @@ add_rest_args (const char *app_id,
if (file_forwarding && doc_mount_path == NULL)
{
g_message ("Can't get document portal mount path\n");
g_message ("Can't get document portal mount path");
can_forward = FALSE;
}
else if (file_forwarding)
@ -4470,7 +4470,7 @@ add_rest_args (const char *app_id,
&local_error);
if (documents == NULL)
{
g_message ("Can't get document portal: %s\n", local_error->message);
g_message ("Can't get document portal: %s", local_error->message);
can_forward = FALSE;
}
}

View File

@ -4724,7 +4724,7 @@ flatpak_pull_from_oci (OstreeRepo *repo,
}
/* Success! It is valid */
g_debug ("Verified OCI signature for %s %s\n", signature->critical.identity.ref, digest);
g_debug ("Verified OCI signature for %s %s", signature->critical.identity.ref, digest);
}
annotations = flatpak_oci_manifest_get_annotations (manifest);
@ -5101,7 +5101,7 @@ stream_closed (GObject *source, GAsyncResult *res, gpointer user_data)
g_autoptr(GError) error = NULL;
if (!g_input_stream_close_finish (stream, res, &error))
g_warning ("Error closing http stream: %s\n", error->message);
g_warning ("Error closing http stream: %s", error->message);
g_main_loop_quit (data->loop);
}

View File

@ -1449,7 +1449,7 @@ get_dbus_method_handler (FlatpakProxyClient *client, Header *header)
strcmp (method, "ListActivatableNames") == 0)
return HANDLE_FILTER_NAME_LIST_REPLY;
g_warning ("Unknown bus method %s\n", method);
g_warning ("Unknown bus method %s", method);
return HANDLE_DENY;
}
else
@ -2100,7 +2100,7 @@ got_buffer_from_bus (FlatpakProxyClient *client, ProxySide *side, Buffer *buffer
break;
default:
g_warning ("Unexpected expected reply type %d\n", expected_reply);
g_warning ("Unexpected expected reply type %d", expected_reply);
}
}
else /* Not reply */
@ -2346,7 +2346,7 @@ client_connected_to_dbus (GObject *source_object,
stream = g_dbus_address_get_stream_finish (res, NULL, &error);
if (stream == NULL)
{
g_warning ("Failed to connect to bus: %s\n", error->message);
g_warning ("Failed to connect to bus: %s", error->message);
g_object_unref (client);
return;
}

View File

@ -74,7 +74,7 @@ main (int argc, char *argv[])
if (related == NULL)
{
g_warning ("Error: %s\n", error->message);
g_warning ("Error: %s", error->message);
continue;
}

View File

@ -462,7 +462,7 @@ xdg_permission_store_start (GDBusConnection *connection)
"/org/freedesktop/impl/portal/PermissionStore",
&error))
{
g_warning ("error: %s\n", error->message);
g_warning ("error: %s", error->message);
g_error_free (error);
}
}

View File

@ -369,7 +369,7 @@ on_bus_acquired (GDBusConnection *connection,
"/org/freedesktop/Flatpak/SessionHelper",
&error))
{
g_warning ("error: %s\n", error->message);
g_warning ("error: %s", error->message);
g_error_free (error);
}
@ -383,7 +383,7 @@ on_bus_acquired (GDBusConnection *connection,
"/org/freedesktop/Flatpak/Development",
&error))
{
g_warning ("error: %s\n", error->message);
g_warning ("error: %s", error->message);
g_error_free (error);
}
}

View File

@ -945,7 +945,7 @@ on_bus_acquired (GDBusConnection *connection,
"/org/freedesktop/Flatpak/SystemHelper",
&error))
{
g_warning ("error: %s\n", error->message);
g_warning ("error: %s", error->message);
g_error_free (error);
}
}