With flags.setupFilesystems gone, justConfig can be removed from booty.
...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(-)
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
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
--
1.6.5.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
12-04-2009, 08:49 AM
Hans de Goede
With flags.setupFilesystems gone, justConfig can be removed from booty.
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(-)
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