[PATCH 2/3] Install grub2 when upgrading on bios x86. (#735730)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We want to probably also remove grub in this case but I haven't
figured out how.
---
 pyanaconda/bootloader.py |    4 +++-
 pyanaconda/yuminstall.py |    4 ++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 538867b..f357892 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -148,6 +148,7 @@ class BootLoader(object):
     """
     name = "Generic Bootloader"
     packages = []
+    obsoletes = []
     config_file = None
     config_file_mode = 0600
     can_dual_boot = False
@@ -1452,7 +1453,8 @@ class GRUB2(GRUB):
 
     """
     name = "GRUB2"
-    packages = ["grub2", "gettext", "os-prober"]
+    packages = ["grub2"]
+    obsoletes = ["grub"]
     _config_file = "grub.cfg"
     _config_dir = "grub2"
     config_file_mode = 0600
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index da10e97..0a4215f 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -1493,6 +1493,10 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
             self.selectFSPackages(anaconda.storage)
             self.selectAnacondaNeeds()
         else:
+            if not anaconda.bootloader.skip_bootloader:
+                map(self.deselectPackage, anaconda.bootloader.obsoletes)
+                map(self.selectPackage, anaconda.bootloader.packages)
+
             self.ayum.update()
 
         while True:
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux