avij / rpms / anaconda

Forked from rpms/anaconda 5 years ago
Clone
Blob Blame History Raw
From 6b70a1867fef732cd75ef79782f71c13241622b7 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 12 Jun 2015 13:59:05 -0400
Subject: [PATCH] Use CentOS branding, increase install priority for Atomic

This is similar to the patch CentOS normally applies to Anaconda,
but updated for Atomic.
---
 pyanaconda/installclasses/rhel.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index a9a99f6..b924cd2 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -30,9 +30,9 @@ from blivet.platform import platform
 from blivet.devicelibs import swap
 
 class RHELBaseInstallClass(BaseInstallClass):
-    name = "Red Hat Enterprise Linux"
+    name = "CentOS Linux"
     sortPriority = 20000
-    if not productName.startswith("Red Hat "):
+    if not productName.startswith("CentOS "):
         hidden = True
     defaultFS = "xfs"
 
@@ -45,7 +45,7 @@ class RHELBaseInstallClass(BaseInstallClass):
 
     _l10n_domain = "comps"
 
-    efi_dir = "redhat"
+    efi_dir = "centos"
 
     def configure(self, anaconda):
         BaseInstallClass.configure(self, anaconda)
@@ -90,9 +90,14 @@ class RHELBaseInstallClass(BaseInstallClass):
         BaseInstallClass.__init__(self)
 
 class RHELAtomicInstallClass(RHELBaseInstallClass):
-    name = "RHEL Atomic Host"
-    if productName.startswith("RHEL Atomic"):
-        hidden = False
+    name = "CentOS Atomic Host"
+    # We have to bump priority because RHEL upstream is relying on a
+    # side effect of the OS name starting with "RHEL" instead of "Red
+    # Hat" and thus the normal RHELBaseInstallClass above not
+    # matching.
+    sortPriority = 20001
+    if not productName.startswith("CentOS "):
+        hidden = True
 
     def setDefaultPartitioning(self, storage):
         autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
-- 
1.8.3.1