mirror of https://github.com/GNOME/gimp.git
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…
This commit is contained in:
parent
f2ef0ec6a5
commit
bc5f6371e9
|
@ -220,6 +220,7 @@ gimp_version (gboolean be_verbose,
|
||||||
{
|
{
|
||||||
gchar *verbose_info;
|
gchar *verbose_info;
|
||||||
gchar *lib_versions;
|
gchar *lib_versions;
|
||||||
|
gchar *flatpak_info = NULL;
|
||||||
|
|
||||||
lib_versions = gimp_library_versions (localized);
|
lib_versions = gimp_library_versions (localized);
|
||||||
verbose_info = g_strdup_printf ("git-describe: %s\n"
|
verbose_info = g_strdup_printf ("git-describe: %s\n"
|
||||||
|
@ -234,9 +235,22 @@ gimp_version (gboolean be_verbose,
|
||||||
lib_versions);
|
lib_versions);
|
||||||
g_free (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 (version);
|
||||||
g_free (verbose_info);
|
g_free (verbose_info);
|
||||||
|
g_free (flatpak_info);
|
||||||
|
|
||||||
version = temp;
|
version = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue