Пример #1
0
class InstallClass(BaseInstallClass):

    id = "sabayon_mate"

    _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":")
    for _pix_dir in _pixmap_dirs:
        _pix_path = os.path.join(_pix_dir, "mate-logo-white.png")
        if os.path.isfile(_pix_path):
            pixmap = _pix_path

    name = N_("Sabayon MATE Desktop")
    dmrc = "mate"
    if Entropy().is_sabayon_steambox():
        dmrc = "steambox"

    _description = N_(
        "Select this installation type for a default installation "
        "with the MATE desktop environment. "
        "After this installation process you will "
        "be able to install additional packages.")
    _descriptionFields = (productName, )
    sortPriority = 10000

    # check if MATE is available on the system
    if not Entropy().is_installed("mate-base/mate-session-manager"):
        hidden = 1

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage,
                                                anaconda.platform)

    def setSteps(self, anaconda):
        BaseInstallClass.setSteps(self, anaconda)
        anaconda.dispatch.skipStep("welcome", skip=1)
        #anaconda.dispatch.skipStep("network", skip = 1)

    def getBackend(self):
        return LiveCDCopyBackend

    def productMatches(self, oldprod):
        if oldprod is None:
            return False

        if oldprod.startswith(productName):
            return True

        return False

    def versionMatches(self, oldver):
        try:
            oldVer = float(oldver)
            newVer = float(productVersion)
        except ValueError:
            return True

        return newVer >= oldVer

    def __init__(self):
        BaseInstallClass.__init__(self)
Пример #2
0
class InstallClass(BaseInstallClass):

    id = "sabayon_awesome"
    name = N_("Sabayon Awesome")

    _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":")
    for _pix_dir in _pixmap_dirs:
        _pix_path = os.path.join(_pix_dir, "awesome.png")
        if os.path.isfile(_pix_path):
            pixmap = _pix_path

    dmrc = "awesome"
    if Entropy().is_sabayon_steambox():
        dmrc = "steambox"

    _description = N_(
        "Select this installation type for a default installation "
        "with the Awesome desktop environment. "
        "A small lightweight and functional working environment at your service."
    )
    _descriptionFields = (productName, )
    sortPriority = 10000

    if not Entropy().is_installed("x11-wm/awesome"):
        hidden = 1

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self, anaconda.storage,
                                                anaconda.platform)

    def setSteps(self, anaconda):
        BaseInstallClass.setSteps(self, anaconda)
        anaconda.dispatch.skipStep("welcome", skip=1)
        #anaconda.dispatch.skipStep("network", skip = 1)

    def getBackend(self):
        return LiveCDCopyBackend

    def productMatches(self, oldprod):
        if oldprod is None:
            return False

        if oldprod.startswith(productName):
            return True

        return False

    def versionMatches(self, oldver):
        try:
            oldVer = float(oldver)
            newVer = float(productVersion)
        except ValueError:
            return True

        return newVer >= oldVer

    def __init__(self):
        BaseInstallClass.__init__(self)
Пример #3
0
    def getScreen(self, anaconda):
        self.intf = anaconda.intf
        self.anaconda = anaconda
        self.hostname = network.getDefaultHostname(anaconda)

        # load the UI
        (self.xml, self.align) = gui.getGladeWidget("network.glade",
                                                    "network_align")
        self.icon = self.xml.get_widget("icon")
        self.hostnameEntry = self.xml.get_widget("hostnameEntry")
        self.hostnameEntry.set_text(self.hostname)

        # pressing Enter in confirm == clicking Next
        self.hostnameEntry.connect("activate",
                                   lambda w: self.ics.setGrabNext(1))

        # load the icon
        gui.readImageFromFile("network.png", image=self.icon)

        self.firewallCb = self.xml.get_widget("firewall_check")
        self.firewallCb.set_active(self.anaconda.network.useFirewall)
        from sabayon import Entropy
        from sabayon.const import FIREWALL_PACKAGE
        if not Entropy().is_installed(FIREWALL_PACKAGE):
            self.firewallCb.set_visible(False)

        return self.align
Пример #4
0
class InstallClass(BaseInstallClass):

    id = "sabayon_fluxbox"
    name = N_("Rogentos Fluxbox")

    _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":")
    for _pix_dir in _pixmap_dirs:
        _pix_path = os.path.join(_pix_dir, "fluxbox.png")
        if os.path.isfile(_pix_path):
            pixmap = _pix_path

    dmrc = "fluxbox"
    _description = N_("Select this installation type for a default installation "
         "with the Fluxbox geeky minimal environment. "
         "After this installation process you will "
         "be able to install additional packages.")
    _descriptionFields = (productName,)
    sortPriority = 9999

    if not Entropy().is_installed("x11-wm/fluxbox"):
        hidden = 1

    def configure(self, anaconda):
        BaseInstallClass.configure(self, anaconda)
        BaseInstallClass.setDefaultPartitioning(self,
            anaconda.storage, anaconda.platform)

    def setSteps(self, anaconda):
        BaseInstallClass.setSteps(self, anaconda)
        anaconda.dispatch.skipStep("welcome", skip = 1)
        #anaconda.dispatch.skipStep("network", skip = 1)

    def getBackend(self):
        return LiveCDCopyBackend

    def productMatches(self, oldprod):
        if oldprod is None:
            return False

        if oldprod.startswith(productName):
            return True

        return False

    def versionMatches(self, oldver):
        try:
            oldVer = float(oldver)
            newVer = float(productVersion)
        except ValueError:
            return True

        return newVer >= oldVer

    def __init__(self):
        BaseInstallClass.__init__(self)
Пример #5
0
        attr[3] = attr[3] & termios.ECHO
        termios.tcsetattr(si, termios.TCSADRAIN, attr)

        print("\nEntering debugger...")
        import pdb
        pdb.post_mortem (tb)
        os.kill(os.getpid(), signal.SIGKILL)

    def runQuit(self, (ty, value, tb)):
        # see a similar comment at runDebug()

        try:
            from sabayon import Entropy
            from entropy.cache import EntropyCacher
            EntropyCacher().stop()
            etp = Entropy()
            etp.destroy()
            if hasattr(etp, 'shutdown'):
                etp.shutdown()
        except ImportError:
            pass

        try:
            isys.vtActivate(1)
        except SystemError:
            pass
        sys.exit(self.exitcode)

def initExceptionHandling(anaconda):
    fileList = [ "/tmp/anaconda.log", "/tmp/lvmout", "/tmp/resize.out",
                 "/tmp/program.log", "/tmp/storage.log", "/tmp/yum.log",
Пример #6
0
        attr[3] = attr[3] & termios.ECHO
        termios.tcsetattr(si, termios.TCSADRAIN, attr)

        print("\nEntering debugger...")
        import pdb
        pdb.post_mortem(tb)
        os.kill(os.getpid(), signal.SIGKILL)

    def runQuit(self, (ty, value, tb)):
        # see a similar comment at runDebug()

        try:
            from sabayon import Entropy
            from entropy.cache import EntropyCacher
            EntropyCacher().stop()
            etp = Entropy()
            etp.destroy()
            if hasattr(etp, 'shutdown'):
                etp.shutdown()
        except ImportError:
            pass

        try:
            isys.vtActivate(1)
        except SystemError:
            pass
        sys.exit(self.exitcode)


def initExceptionHandling(anaconda):
    fileList = [