[PATCH] remove the remnants of sparc support

Dennis Gilmore dennis at ausil.us
Mon Feb 25 11:59:07 UTC 2013


Signed-off-by: Dennis Gilmore <dennis at ausil.us>
---
 configure.ac                |  5 +--
 pyanaconda/bootloader.py    | 86 ++-------------------------------------------
 pyanaconda/isys/__init__.py |  2 +-
 pyanaconda/isys/isys.c      |  2 +-
 4 files changed, 5 insertions(+), 90 deletions(-)

diff --git a/configure.ac b/configure.ac
index 71c3285..345b6df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,7 +171,7 @@ rel="`awk '/Release:/ { split($2, r, "%"); print r[[1]] }' anaconda.spec.in`"
 AC_SUBST(PACKAGE_RELEASE, [$rel])
 
 # Set $(ARCH) and arch-related tests
-s_arch="`uname -m | sed -e s/i.86/i386/ -e s/sparc.*/sparc/ -e s/ppc.*/ppc/`"
+s_arch="`uname -m | sed -e s/i.86/i386/ -e s/ppc.*/ppc/`"
 AC_SUBST(ARCH, [$s_arch])
 
 AM_CONDITIONAL(IS_LIVEINST_ARCH,
@@ -195,9 +195,6 @@ AM_CONDITIONAL(IS_S390,
 AM_CONDITIONAL(IS_X86_64,
   [test x$s_arch == xx86_64])
 
-AM_CONDITIONAL(IS_SPARC,
-  [test x$s_arch == xsparc || test x$s_arch == xsparc64])
-
 AC_CONFIG_SUBDIRS([widgets])
 
 AC_CONFIG_FILES([Makefile
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index c24ccc3..a802ca8 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -900,7 +900,6 @@ class BootLoader(object):
 
     def write_config_images(self, config):
         """Write image configuration entries."""
-        # XXX might this be identical for yaboot and silo?
         raise NotImplementedError()
 
     def write_config_post(self):
@@ -1707,7 +1706,7 @@ class MacEFIGRUB(EFIGRUB):
         self.mactel_config()
 
 
-class YabootSILOBase(BootLoader):
+class YabootBase(BootLoader):
     def write_config_password(self, config):
         if self.password:
             config.write("password=%s\n" % self.password)
@@ -1751,7 +1750,7 @@ class YabootSILOBase(BootLoader):
             config.write(stanza)
 
 
-class Yaboot(YabootSILOBase):
+class Yaboot(YabootBase):
     name = "Yaboot"
     _config_file = "yaboot.conf"
     prog = "ybin"
@@ -2070,86 +2069,6 @@ class ZIPL(BootLoader):
         message = iutil.reIPL(self.stage1_name)
         log.info(message)
 
-class SILO(YabootSILOBase):
-    name = "SILO"
-    _config_file = "silo.conf"
-    message_file = "/etc/silo.message"
-
-    # stage1 device requirements
-    stage1_device_types = ["disk"]
-
-    # stage2 device requirements
-    stage2_device_types = ["partition"]
-
-    packages = ["silo"]
-
-    image_label_attr = "short_label"
-
-    #
-    # configuration
-    #
-
-    @property
-    def config_dir(self):
-        if self.stage2_device.format.mountpoint == "/boot":
-            return "/boot"
-        else:
-            return "/etc"
-
-    @property
-    def config_file(self):
-        return "%s/%s" % (self.config_dir, self._config_file)
-
-    def write_message_file(self):
-        message_file = os.path.normpath(ROOT_PATH + self.message_file)
-        f = open(message_file, "w")
-        f.write("Welcome to %s!\nHit <TAB> for boot options\n\n" % productName)
-        f.close()
-        os.chmod(message_file, 0600)
-
-    def write_config_header(self, config):
-        header = ("# silo.conf generated by anaconda\n\n"
-                  "#boot=%(stage1dev)s\n"
-                  "message=%(message)s\n"
-                  "timeout=%(timeout)d\n"
-                  "partition=%(boot_part_num)d\n"
-                  "default=%(default)s\n"
-                  % {"stage1dev": self.stage1_device.path,
-                     "message": self.message_file, "timeout": self.timeout,
-                     "boot_part_num": self.stage1_device.partedPartition.number,
-                     "default": self.image_label(self.default)})
-        config.write(header)
-        self.write_config_password(config)
-
-    def write_config_post(self):
-        etc_silo = os.path.normpath(ROOT_PATH + "/etc/" + self._config_file)
-        if not os.access(etc_silo, os.R_OK):
-            try:
-                os.symlink("../boot/%s" % self._config_file, etc_silo)
-            except OSError as e:
-                log.warning("failed to create /etc/silo.conf symlink: %s" % e)
-
-    def write_config(self):
-        self.write_message_file()
-        super(SILO, self).write_config()
-
-    #
-    # installation
-    #
-
-    def install(self):
-        backup = "%s/backup.b" % self.config_dir
-        args = ["-f", "-C", self.config_file, "-S", backup]
-        variant = iutil.getSparcMachine()
-        if variant in ("sun4u", "sun4v"):
-            args.append("-u")
-        else:
-            args.append("-U")
-
-        rc = iutil.execWithRedirect("silo", args, root=ROOT_PATH)
-
-        if rc:
-            raise BootLoaderError("bootloader install failed")
 
 class UBOOT(BootLoader):
     name = "UBOOT"
@@ -2199,7 +2118,6 @@ bootloader_by_platform = {platform.X86: GRUB2,
                           platform.IPSeriesPPC: IPSeriesGRUB2,
                           platform.NewWorldPPC: MacYaboot,
                           platform.S390: ZIPL,
-                          platform.Sparc: SILO,
                           platform.ARM: UBOOT,
                           platform.omapARM: UBOOT}
 
diff --git a/pyanaconda/isys/__init__.py b/pyanaconda/isys/__init__.py
index bbf4a2e..6953793 100755
--- a/pyanaconda/isys/__init__.py
+++ b/pyanaconda/isys/__init__.py
@@ -45,7 +45,7 @@ import dbus
 import logging
 log = logging.getLogger("anaconda")
 
-if blivet.arch.getArch() in ("sparc", "ppc64"):
+if blivet.arch.getArch() in ("ppc64"):
     MIN_RAM = 768 * 1024
     GUI_INSTALL_EXTRA_RAM = 512 * 1024
 else:
diff --git a/pyanaconda/isys/isys.c b/pyanaconda/isys/isys.c
index d4e977c..c99cb19 100644
--- a/pyanaconda/isys/isys.c
+++ b/pyanaconda/isys/isys.c
@@ -26,7 +26,7 @@
 #include <fcntl.h>
 /* Need to tell loop.h what the actual dev_t type is. */
 #undef dev_t
-#if defined(__alpha) || (defined(__sparc__) && defined(__arch64__))
+#if defined(__alpha)
 #define dev_t unsigned int
 #else
 #if defined(__x86_64__)
-- 
1.8.1.4



More information about the anaconda-patches mailing list