[PATCH] Don't put "Linux" in a root's name if it's already there.

Chris Lumens clumens at redhat.com
Fri Aug 29 14:23:46 UTC 2014


Without this patch, we end up with strings like the following in anaconda's
custom partitioning UI:  "Red Hat Enterprise Linux Server Linux 7.0".
Just in case you didn't know what OS it was.
---
 blivet/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index f8e8ac3..d9d6d56 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -3129,6 +3129,9 @@ def findExistingInstallations(devicetree):
             # to translate.
             if not product or not version or not architecture:
                 name = _("Unknown Linux")
+            elif "linux" in product.lower():
+                name = _("%(product)s %(version)s for %(arch)s") % \
+                        {"product": product, "version": version, "arch": architecture}
             else:
                 name = _("%(product)s Linux %(version)s for %(arch)s") % \
                         {"product": product, "version": version, "arch": architecture}
-- 
1.9.3



More information about the anaconda-patches mailing list