lib/deploy: Don't include version twice in bootmenu title

In Silverblue right now, the boot menu title looks like this:

    Fedora 29.20190301.0 (Workstation Edition) 29.20190301.0 (ostree)

This is because RPM-OSTree's `mutate-os-release` feature is enabled,
which injects the OSTree version string directly into `VERSION` and
`PRETTY_NAME`. So appending the version string again is a bit redundant.
Let's just do a simple substring check here before adding the version to
the title.

Closes: #1829
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2019-03-09 19:44:15 +00:00
1 parent 21ebc7d21e
commit 978cffed70
3 files changed
+13 -4

No files matched your search

+1 -1
View File
@@ -1739,7 +1739,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
* (specifically, it looks for the substring "(ostree"), so further
* changes to the title format may require updating that backend. */
g_autoptr(GString) title_key = g_string_new (val);
if (deployment_version && *deployment_version)
if (deployment_version && *deployment_version && !strstr (val, deployment_version))
{
g_string_append_c (title_key, ' ');
g_string_append (title_key, deployment_version);