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

[PATCH 1/4] Remove target parameter from grub installation code - it is no more needed.



This is one of follow-up commits for commit
358a9a34f496fdd2b032edf12274a146b606d1a4, dealing with upgrade.
---
 booty/bootloaderInfo.py |    3 +--
 booty/x86.py            |   14 +++-----------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index ba9d442..36cfb42 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -626,8 +626,7 @@ class efiBootloaderInfo(bootloaderInfo):
                                     stderr = "/dev/tty5")
         return rc
 
-    def installGrub(self, instRoot, bootDev, grubTarget, grubPath,
-                    target, cfPath):
+    def installGrub(self, instRoot, bootDev, grubTarget, grubPath, cfPath):
         if not iutil.isEfi():
             raise EnvironmentError
         rc = self.removeOldEfiEntries(instRoot)
diff --git a/booty/x86.py b/booty/x86.py
index 9519e82..407f7c9 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -115,11 +115,10 @@ class x86BootloaderInfo(efiBootloaderInfo):
                updatedMatches.append((getDiskPart(mdBootPart, self.storage)[0], mdBootPart))
         return updatedMatches
 
-    def installGrub(self, instRoot, bootDev, grubTarget, grubPath,
-                    target, cfPath):
+    def installGrub(self, instRoot, bootDev, grubTarget, grubPath, cfPath):
         if iutil.isEfi():
             return efiBootloaderInfo.installGrub(self, instRoot, bootDev, grubTarget,
-                                                 grubPath, target, cfPath)
+                                                 grubPath, cfPath)
 
         args = "--stage2=/boot/grub/stage2 "
 
@@ -214,12 +213,6 @@ class x86BootloaderInfo(efiBootloaderInfo):
             os.rename(cf, cf + '.rpmsave')
 
         grubTarget = bl.getDevice()
-        targetDevice = self.storage.devicetree.getDeviceByName(grubTarget)
-        path = targetDevice.path[5:]
-        if targetDevice.type == "partition" or targetDevice.type == "mdarray":
-            target = "partition"
-        else:
-            target = "mbr"
 
         f = open(cf, "w+")
 
@@ -419,8 +412,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
         f.close()
             
         if not justConfigFile:
-            return self.installGrub(instRoot, bootDev, grubTarget, grubPath,
-                             target, cfPath)
+            return self.installGrub(instRoot, bootDev, grubTarget, grubPath, cfPath)
 
         return 0
 
-- 
1.6.0.6


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