zengxyz / rpms / anaconda

Forked from rpms/anaconda 4 months ago
Clone
Karanbir Singh 17adf5
From 6b70a1867fef732cd75ef79782f71c13241622b7 Mon Sep 17 00:00:00 2001
Karanbir Singh 17adf5
From: Colin Walters <walters@verbum.org>
Karanbir Singh 17adf5
Date: Fri, 12 Jun 2015 13:59:05 -0400
Karanbir Singh 17adf5
Subject: [PATCH] Use CentOS branding, increase install priority for Atomic
Karanbir Singh 17adf5
Karanbir Singh 17adf5
This is similar to the patch CentOS normally applies to Anaconda,
Karanbir Singh 17adf5
but updated for Atomic.
Karanbir Singh 17adf5
---
Karanbir Singh 17adf5
 pyanaconda/installclasses/rhel.py | 17 +++++++++++------
Karanbir Singh 17adf5
 1 file changed, 11 insertions(+), 6 deletions(-)
Karanbir Singh 17adf5
Karanbir Singh 17adf5
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
Karanbir Singh 17adf5
index a9a99f6..b924cd2 100644
Karanbir Singh 17adf5
--- a/pyanaconda/installclasses/rhel.py
Karanbir Singh 17adf5
+++ b/pyanaconda/installclasses/rhel.py
Karanbir Singh 17adf5
@@ -30,9 +30,9 @@ from blivet.platform import platform
Karanbir Singh f741c4
 from blivet.devicelibs import swap
Karanbir Singh f741c4
 
Karanbir Singh f741c4
 class RHELBaseInstallClass(BaseInstallClass):
Karanbir Singh f741c4
-    name = "Red Hat Enterprise Linux"
Karanbir Singh f741c4
+    name = "CentOS Linux"
Karanbir Singh f741c4
     sortPriority = 20000
Karanbir Singh f741c4
-    if not productName.startswith("Red Hat "):
Karanbir Singh f741c4
+    if not productName.startswith("CentOS "):
Karanbir Singh f741c4
         hidden = True
Karanbir Singh f741c4
     defaultFS = "xfs"
Karanbir Singh f741c4
 
Karanbir Singh 17adf5
@@ -45,7 +45,7 @@ class RHELBaseInstallClass(BaseInstallClass):
Karanbir Singh f741c4
 
Karanbir Singh f741c4
     _l10n_domain = "comps"
Karanbir Singh f741c4
 
Karanbir Singh f741c4
-    efi_dir = "redhat"
Karanbir Singh f741c4
+    efi_dir = "centos"
Karanbir Singh f741c4
 
Karanbir Singh f741c4
     def configure(self, anaconda):
Karanbir Singh f741c4
         BaseInstallClass.configure(self, anaconda)
Karanbir Singh 17adf5
@@ -90,9 +90,14 @@ class RHELBaseInstallClass(BaseInstallClass):
Karanbir Singh f741c4
         BaseInstallClass.__init__(self)
Karanbir Singh f741c4
 
Karanbir Singh f741c4
 class RHELAtomicInstallClass(RHELBaseInstallClass):
Karanbir Singh f741c4
-    name = "RHEL Atomic Host"
Karanbir Singh f741c4
-    if productName.startswith("RHEL Atomic"):
Karanbir Singh 17adf5
-        hidden = False
Karanbir Singh f741c4
+    name = "CentOS Atomic Host"
Karanbir Singh 17adf5
+    # We have to bump priority because RHEL upstream is relying on a
Karanbir Singh 17adf5
+    # side effect of the OS name starting with "RHEL" instead of "Red
Karanbir Singh 17adf5
+    # Hat" and thus the normal RHELBaseInstallClass above not
Karanbir Singh 17adf5
+    # matching.
Karanbir Singh 17adf5
+    sortPriority = 20001
Karanbir Singh 17adf5
+    if not productName.startswith("CentOS "):
Karanbir Singh 17adf5
+        hidden = True
Karanbir Singh f741c4
 
Karanbir Singh f741c4
     def setDefaultPartitioning(self, storage):
Karanbir Singh 17adf5
         autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
Karanbir Singh 17adf5
-- 
Karanbir Singh 17adf5
1.8.3.1
Karanbir Singh 17adf5