Commit a0c1a2cc authored by Jehan's avatar Jehan

app: add contents of /.flatpak-info in the verbose info.

This file is available in a flatpak sandbox and will contain various
info such as the build commit, very useful info as we can have several
builds for a same version. For instance if we have exactly the right
commit, we can load exactly the same binary as a bug reporter very
easily, hence are able to get source correspondance without necessarily
asking reporters to install debug symbols (though it stays easier if
they can do it).

Other interesting info contained in this file are the exact runtime
used, the installed application or runtime extensions, the permissions
(people may override our flatpak permissions so it's useful to be able
to check when they did) and environment variables…

(cherry picked from commit bc5f6371)
parent b0a4a95b
......@@ -220,6 +220,7 @@ gimp_version (gboolean be_verbose,
{
gchar *verbose_info;
gchar *lib_versions;
gchar *flatpak_info = NULL;
lib_versions = gimp_library_versions (localized);
verbose_info = g_strdup_printf ("git-describe: %s\n"
......@@ -234,9 +235,22 @@ gimp_version (gboolean be_verbose,
lib_versions);
g_free (lib_versions);
temp = g_strconcat (version, verbose_info, NULL);
/* This file should be available at root path in a flatpak
* environment. Just add its contents to the verbose output if it
* exists. Silently ignore otherwise.
*/
if (g_file_get_contents ("/.flatpak-info", &flatpak_info, NULL, NULL))
{
temp = g_strdup_printf ("\n# Flatpak info #\n%s",
flatpak_info);
g_free (flatpak_info);
flatpak_info = temp;
}
temp = g_strconcat (version, verbose_info, flatpak_info, NULL);
g_free (version);
g_free (verbose_info);
g_free (flatpak_info);
version = temp;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment