Re: [PATCH 2/2] With flags.setupFilesystems gone, justConfig can be removed from booty.

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

 



Ack.

On 12/03/2009 03:29 PM, Chris Lumens wrote:
...well, it can mostly be removed.  The s390 and x86 classes still do some
complicated things that end up with a justConfig test, so it has to stay
in those files.  However, their write() methods no longer need to accept
that parameter.
---
  booty/alpha.py          |   66 ++++++++++++++++++++++------------------------
  booty/bootloaderInfo.py |    3 +-
  booty/ia64.py           |    7 ++---
  booty/ppc.py            |    7 ++---
  booty/s390.py           |    4 +-
  booty/sparc.py          |    6 ++--
  booty/x86.py            |    6 ++--
  7 files changed, 47 insertions(+), 52 deletions(-)

diff --git a/booty/alpha.py b/booty/alpha.py
index da9f839..6fd8a19 100644
--- a/booty/alpha.py
+++ b/booty/alpha.py
@@ -17,7 +17,7 @@ class alphaBootloaderInfo(bootloaderInfo):
          return partitionNumber + 1

      def writeAboot(self, instRoot, bl, kernelList,
-                   chainList, defaultDev, justConfig):
+                   chainList, defaultDev):
          rootDevice = self.storage.rootDevice
          try:
              bootDevice = self.storage.mountpoints["/boot"]
@@ -100,47 +100,45 @@ class alphaBootloaderInfo(bootloaderInfo):
          f.close ()
          del f

-        if not justConfig:
-            # Now we're ready to write the relevant boot information. wbd
-            # is the whole boot device, bdpn is the boot device partition
-            # number.
-            wbd = self.wholeDevice (bootDevice.path)
-            bdpn = self.partitionNum (bootDevice.path)
-
-            # Calling swriteboot. The first argument is the disk to write
-            # to and the second argument is a path to the bootstrap loader
-            # file.
-            args = [("/dev/%s" % wbd), "/boot/bootlx"]
-            rc = iutil.execWithRedirect ('/sbin/swriteboot', args,
-                                         root = instRoot,
-                                         stdout = "/dev/tty5",
-                                         stderr = "/dev/tty5")
-            if rc:
-                return rc
-
-            # Calling abootconf to configure the installed aboot. The
-            # first argument is the disk to use, the second argument is
-            # the number of the partition on which aboot.conf resides.
-            # It's always the boot partition whether it's / or /boot (with
-            # the mount point being omitted.)
-            args = [("/dev/%s" % wbd), str (bdpn)]
-            rc = iutil.execWithRedirect ('/sbin/abootconf', args,
-                                         root = instRoot,
-                                         stdout = "/dev/tty5",
-                                         stderr = "/dev/tty5")
-            if rc:
-                return rc
+        # Now we're ready to write the relevant boot information. wbd
+        # is the whole boot device, bdpn is the boot device partition
+        # number.
+        wbd = self.wholeDevice (bootDevice.path)
+        bdpn = self.partitionNum (bootDevice.path)
+
+        # Calling swriteboot. The first argument is the disk to write
+        # to and the second argument is a path to the bootstrap loader
+        # file.
+        args = [("/dev/%s" % wbd), "/boot/bootlx"]
+        rc = iutil.execWithRedirect ('/sbin/swriteboot', args,
+                                     root = instRoot,
+                                     stdout = "/dev/tty5",
+                                     stderr = "/dev/tty5")
+        if rc:
+            return rc
+
+        # Calling abootconf to configure the installed aboot. The
+        # first argument is the disk to use, the second argument is
+        # the number of the partition on which aboot.conf resides.
+        # It's always the boot partition whether it's / or /boot (with
+        # the mount point being omitted.)
+        args = [("/dev/%s" % wbd), str (bdpn)]
+        rc = iutil.execWithRedirect ('/sbin/abootconf', args,
+                                     root = instRoot,
+                                     stdout = "/dev/tty5",
+                                     stderr = "/dev/tty5")
+        if rc:
+            return rc

          return 0


-    def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+    def write(self, instRoot, bl, kernelList, chainList, defaultDev):
          if len(kernelList)<  1:
              raise BootyNoKernelWarning

          return self.writeAboot(instRoot, bl, kernelList,
-                               chainList, defaultDev, justConfig)
+                               chainList, defaultDev)

      def __init__(self, instData):
          bootloaderInfo.__init__(self, instData)
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index deddb4d..613b489 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -439,8 +439,7 @@ class bootloaderInfo(object):

          return lilo

-    def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+    def write(self, instRoot, bl, kernelList, chainList, defaultDev):
          rc = 0

          if len(kernelList)>= 1:
diff --git a/booty/ia64.py b/booty/ia64.py
index 24bcf6b..b2414f4 100644
--- a/booty/ia64.py
+++ b/booty/ia64.py
@@ -13,16 +13,15 @@ class ia64BootloaderInfo(efiBootloaderInfo):
          return config

      def writeLilo(self, instRoot, bl, kernelList,
-                  chainList, defaultDev, justConfig):
+                  chainList, defaultDev):
          config = self.getBootloaderConfig(instRoot, bl,
                                            kernelList, chainList, defaultDev)
          return config.write(instRoot + self.configfile, perms = 0755)

-    def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+    def write(self, instRoot, bl, kernelList, chainList, defaultDev):
          if len(kernelList)>= 1:
              rc = self.writeLilo(instRoot, bl, kernelList,
-                                chainList, defaultDev, justConfig)
+                                chainList, defaultDev)
              if rc:
                  return rc
          else:
diff --git a/booty/ppc.py b/booty/ppc.py
index f8ace14..fbdd376 100644
--- a/booty/ppc.py
+++ b/booty/ppc.py
@@ -40,7 +40,7 @@ class ppcBootloaderInfo(bootloaderInfo):
          return retval

      def writeYaboot(self, instRoot, bl, kernelList,
-                  chainList, defaultDev, justConfigFile):
+                    chainList, defaultDev):

          yabootTarget = string.join(self.getBootDevs(bl))

@@ -161,11 +161,10 @@ class ppcBootloaderInfo(bootloaderInfo):
          # or not
          self.password = val

-    def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+    def write(self, instRoot, bl, kernelList, chainList, defaultDev):
          if len(kernelList)>= 1:
              rc = self.writeYaboot(instRoot, bl, kernelList,
-                                  chainList, defaultDev, justConfig)
+                                  chainList, defaultDev)
              if rc:
                  return rc
          else:
diff --git a/booty/s390.py b/booty/s390.py
index 84feb6b..1cc6e71 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -161,10 +161,10 @@ class s390BootloaderInfo(bootloaderInfo):
          return 0

      def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+            defaultDev):
          rc = self.writeZipl(instRoot, bl, kernelList,
                              chainList, defaultDev,
-                            justConfig | (not self.useZiplVal))
+                            not self.useZiplVal)
          if rc:
              return rc

diff --git a/booty/sparc.py b/booty/sparc.py
index 276eafd..c7fb9d8 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -5,7 +5,7 @@ from bootloaderInfo import *

  class sparcBootloaderInfo(bootloaderInfo):
      def writeSilo(self, instRoot, bl, kernelList,
-                chainList, defaultDev, justConfigFile):
+                  chainList, defaultDev):

          try:
              bootDev = self.storage.mountpoints["/boot"]
@@ -113,10 +113,10 @@ class sparcBootloaderInfo(bootloaderInfo):
          self.password = val

      def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+              defaultDev):
          if len(kernelList)>= 1:
              return self.writeSilo(instRoot, bl, kernelList, chainList,
-                                  defaultDev, justConfig)
+                                  defaultDev)
          else:
              raise BootyNoKernelWarning

diff --git a/booty/x86.py b/booty/x86.py
index 40ec7f2..bc0dcf6 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -490,7 +490,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
          return config

      def write(self, instRoot, bl, kernelList, chainList,
-            defaultDev, justConfig):
+              defaultDev):
          if self.timeout is None and chainList:
              self.timeout = 5

@@ -498,7 +498,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
          if self.doUpgradeOnly:
              if self.useGrubVal:
                  return self.writeGrub(instRoot, bl, kernelList,
-                                      chainList, defaultDev, justConfig,
+                                      chainList, defaultDev,
                                        upgrade = True)
              return 0

@@ -507,7 +507,7 @@ class x86BootloaderInfo(efiBootloaderInfo):

          rc = self.writeGrub(instRoot, bl, kernelList,
                              chainList, defaultDev,
-                            justConfig | (not self.useGrubVal))
+                            not self.useGrubVal)
          if rc:
              return rc


_______________________________________________
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