[[PATCH rhel7-branch] 4/5] Change the product name we key off (#1055019).

Chris Lumens clumens at redhat.com
Mon Jan 27 15:09:17 UTC 2014


We're getting used in RHEL-like products that are not named "Red Hat Enterprise
Linux".  In those products, the Fedora codepaths are getting used by mistake.
---
 pyanaconda/bootloader.py             | 4 ++--
 pyanaconda/installclasses/fedora.py  | 2 +-
 pyanaconda/installclasses/rhel.py    | 2 +-
 pyanaconda/ui/gui/spokes/welcome.py  | 2 +-
 pyanaconda/ui/tui/spokes/warnings.py | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 4127dbf..1fe292f 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1381,7 +1381,7 @@ class GRUB2(GRUB):
 
     @property
     def stage2_format_types(self):
-        if productName.startswith("Red Hat Enterprise Linux"):
+        if productName.startswith("Red Hat "):
             return ["xfs", "ext4", "ext3", "ext2", "btrfs"]
         else:
             return ["ext4", "ext3", "ext2", "btrfs", "xfs"]
@@ -2031,7 +2031,7 @@ class ZIPL(BootLoader):
 
     @property
     def stage2_format_types(self):
-        if productName.startswith("Red Hat Enterprise Linux"):
+        if productName.startswith("Red Hat "):
             return ["xfs", "ext4", "ext3", "ext2"]
         else:
             return ["ext4", "ext3", "ext2", "xfs"]
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 8844ea8..98e922f 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -31,7 +31,7 @@ class InstallClass(BaseInstallClass):
     id = "fedora"
     name = N_("_Fedora")
     sortPriority = 10000
-    if productName.startswith("Red Hat Enterprise"):
+    if productName.startswith("Red Hat "):
         hidden = 1
 
     _l10n_domain = "anaconda"
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index 63882b6..a07c0b1 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -29,7 +29,7 @@ class InstallClass(BaseInstallClass):
     id = "rhel"
     name = N_("Red Hat Enterprise Linux")
     sortPriority = 20000
-    if not productName.startswith("Red Hat Enterprise"):
+    if not productName.startswith("Red Hat "):
         hidden = 1
     defaultFS = "xfs"
 
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 45abe88..e23c56c 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -271,7 +271,7 @@ class WelcomeLanguageSpoke(LangLocaleHandler, StandaloneSpoke):
             if rc == 0:
                 sys.exit(0)
 
-        if productName.startswith("Red Hat Enterprise Linux") and \
+        if productName.startswith("Red Hat ") and \
           is_unsupported_hw() and not self.data.unsupportedhardware.unsupported_hardware:
             dlg = self.builder.get_object("unsupportedHardwareDialog")
             with enlightbox(self.window, dlg):
diff --git a/pyanaconda/ui/tui/spokes/warnings.py b/pyanaconda/ui/tui/spokes/warnings.py
index be83929..852cc2f 100644
--- a/pyanaconda/ui/tui/spokes/warnings.py
+++ b/pyanaconda/ui/tui/spokes/warnings.py
@@ -46,7 +46,7 @@ class WarningsSpoke(StandaloneTUISpoke):
                           "supported hardware, please refer to "
                           "http://www.redhat.com/hardware." )
         # Does anything need to be displayed?
-        self._unsupported = productName.startswith("Red Hat Enterprise Linux") and \
+        self._unsupported = productName.startswith("Red Hat ") and \
                             is_unsupported_hw() and \
                             not self.data.unsupportedhardware.unsupported_hardware
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list