Re: [PATCH] Platform.bootloaderPackage -> Platform.packages

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

 



On Wed, 2009-10-21 at 13:36 -0400, Chris Lumens wrote:
> This seems to be a more future-proof way of doing things.
> ---
>  platform.py   |   18 +++++++++---------
>  yuminstall.py |    2 +-
>  2 files changed, 10 insertions(+), 10 deletions(-)

Looks reasonable.

> 
> diff --git a/platform.py b/platform.py
> index 8697090..4140c4f 100644
> --- a/platform.py
> +++ b/platform.py
> @@ -39,10 +39,10 @@ class Platform(object):
>         architecture quirks in one place to avoid lots of platform checks
>         throughout anaconda."""
>      _bootFSType = "ext3"
> -    _bootloaderPackage = None
>      _diskType = parted.diskType["msdos"]
>      _isEfi = iutil.isEfi()
>      _minimumSector = 0
> +    _packages = []
>      _supportsMdRaidBoot = False
>      _minBootPartSize = 50
>      _maxBootPartSize = 0
> @@ -98,10 +98,6 @@ class Platform(object):
>  
>          return ret
>  
> -    @property
> -    def bootloaderPackage(self):
> -        return self._bootloaderPackage
> -
>      def checkBootRequest(self, req):
>          """Perform an architecture-specific check on the boot device.  Not all
>             platforms may need to do any checks.  Returns a list of errors if
> @@ -160,6 +156,10 @@ class Platform(object):
>          """Return the minimum starting sector for the provided disk."""
>          return self._minimumSector
>  
> +    @property
> +    def packages (self):
> +        return self._packages
> +
>      def setDefaultPartitioning(self):
>          """Return the default platform-specific partitioning information."""
>          return [PartSpec(mountpoint="/boot", fstype=self.bootFSType, size=200,
> @@ -279,14 +279,14 @@ class Alpha(Platform):
>          return errors
>  
>  class IA64(EFI):
> -    _bootloaderPackage = "elilo"
> +    _packages = ["elilo"]
>  
>      def __init__(self, anaconda):
>          EFI.__init__(self, anaconda)
>  
>  class PPC(Platform):
> -    _bootloaderPackage = "yaboot"
>      _bootFSType = "ext4"
> +    _packages = ["yaboot"]
>      _ppcMachine = iutil.getPPCMachine()
>      _supportsMdRaidBoot = True
>  
> @@ -440,7 +440,7 @@ class PS3(PPC):
>          PPC.__init__(self, anaconda)
>  
>  class S390(Platform):
> -    _bootloaderPackage = "s390utils"
> +    _packages = ["s390utils"]
>  
>      def __init__(self, anaconda):
>          Platform.__init__(self, anaconda)
> @@ -456,8 +456,8 @@ class Sparc(Platform):
>          return start+1
>  
>  class X86(EFI):
> -    _bootloaderPackage = "grub"
>      _bootFSType = "ext4"
> +    _packages = ["grub"]
>      _supportsMdRaidBoot = True
>  
>      def __init__(self, anaconda):
> diff --git a/yuminstall.py b/yuminstall.py
> index df471e9..0eb428a 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -1354,7 +1354,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
>          if not anaconda.id.getUpgrade():
>              # New installs only - upgrades will already have all this stuff.
>              self.selectBestKernel(anaconda)
> -            self.selectPackage(anaconda.platform.bootloaderPackage)
> +            map(self.selectPackage, anaconda.platform.packages)
>              self.selectFSPackages(anaconda.id.storage)
>              self.selectAnacondaNeeds()
>          else:

_______________________________________________
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