From 2590d96369d0217e31dc2812690dde61dac417b5 Mon Sep 17 00:00:00 2001 From: wiktor w brodlo Date: Wed, 15 Jun 2011 16:59:54 +0000 Subject: Initial import from Sabayon (ver 0.9.9.56) --- installclasses/Makefile.am | 24 +++++++++++++ installclasses/corecd.py | 90 ++++++++++++++++++++++++++++++++++++++++++++++ installclasses/fluxbox.py | 89 +++++++++++++++++++++++++++++++++++++++++++++ installclasses/gnome.py | 90 ++++++++++++++++++++++++++++++++++++++++++++++ installclasses/kde.py | 89 +++++++++++++++++++++++++++++++++++++++++++++ installclasses/lxde.py | 88 +++++++++++++++++++++++++++++++++++++++++++++ installclasses/xfce.py | 88 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 558 insertions(+) create mode 100644 installclasses/Makefile.am create mode 100644 installclasses/corecd.py create mode 100644 installclasses/fluxbox.py create mode 100644 installclasses/gnome.py create mode 100644 installclasses/kde.py create mode 100644 installclasses/lxde.py create mode 100644 installclasses/xfce.py (limited to 'installclasses') diff --git a/installclasses/Makefile.am b/installclasses/Makefile.am new file mode 100644 index 0000000..d7bd1eb --- /dev/null +++ b/installclasses/Makefile.am @@ -0,0 +1,24 @@ +# installclasses/Makefile.am for anaconda +# +# Copyright (C) 2009 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . +# +# Author: David Cantrell + +pkgpyexecdir = $(pyexecdir)/py$(PACKAGE_NAME) +installclassesdir = $(pkgpyexecdir)/installclasses +installclasses_PYTHON = *.py + +MAINTAINERCLEANFILES = Makefile.in diff --git a/installclasses/corecd.py b/installclasses/corecd.py new file mode 100644 index 0000000..e1fbb18 --- /dev/null +++ b/installclasses/corecd.py @@ -0,0 +1,90 @@ +# +# xfce.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_corecd" + name = N_("Sabayon Core CD") + + _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":") + for _pix_dir in _pixmap_dirs: + _pix_path = os.path.join(_pix_dir, "sabayon-core.png") + if os.path.isfile(_pix_path): + pixmap = _pix_path + + dmrc = None + simplenet = True + _description = N_("Select this installation type to just install " + "a Core System without graphical applications. " + "This is the best choice for Server-oriented " + "deployments.") + _descriptionFields = (productName,) + sortPriority = 10000 + + if not Entropy.is_corecd(): + 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) diff --git a/installclasses/fluxbox.py b/installclasses/fluxbox.py new file mode 100644 index 0000000..c02c103 --- /dev/null +++ b/installclasses/fluxbox.py @@ -0,0 +1,89 @@ +# +# xfce.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_fluxbox" + name = N_("Sabayon 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) diff --git a/installclasses/gnome.py b/installclasses/gnome.py new file mode 100644 index 0000000..f66aabd --- /dev/null +++ b/installclasses/gnome.py @@ -0,0 +1,90 @@ +# +# gnome.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_gnome" + + _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":") + for _pix_dir in _pixmap_dirs: + _pix_path = os.path.join(_pix_dir, "gnome.png") + if os.path.isfile(_pix_path): + pixmap = _pix_path + + name = N_("Sabayon GNOME Desktop") + dmrc = "gnome" + _description = N_("Select this installation type for a default installation " + "with the GNOME desktop environment. " + "After this installation process you will " + "be able to install additional packages.") + _descriptionFields = (productName,) + sortPriority = 10000 + + # check if GNOME is available on the system + if not Entropy().is_installed("gnome-base/gnome-session"): + 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) diff --git a/installclasses/kde.py b/installclasses/kde.py new file mode 100644 index 0000000..ec21f20 --- /dev/null +++ b/installclasses/kde.py @@ -0,0 +1,89 @@ +# +# kde.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_kde" + name = N_("Sabayon KDE") + + _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":") + for _pix_dir in _pixmap_dirs: + _pix_path = os.path.join(_pix_dir, "kde.png") + if os.path.isfile(_pix_path): + pixmap = _pix_path + + dmrc = "KDE-4" + _description = N_("Select this installation type for a default installation " + "with the KDE desktop environment. " + "After this installation process you will " + "be able to install additional packages.") + _descriptionFields = (productName,) + sortPriority = 10000 + + if not Entropy().is_installed("kde-base/kdebase-startkde"): + 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) diff --git a/installclasses/lxde.py b/installclasses/lxde.py new file mode 100644 index 0000000..dfe7aae --- /dev/null +++ b/installclasses/lxde.py @@ -0,0 +1,88 @@ +# +# xfce.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_lxde" + name = N_("Sabayon LXDE") + + _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":") + for _pix_dir in _pixmap_dirs: + _pix_path = os.path.join(_pix_dir, "lxde.pg") + if os.path.isfile(_pix_path): + pixmap = _pix_path + + dmrc = "xfce" + _description = N_("Select this installation type for a default installation " + "with the LXDE desktop environment. " + "A small lightweight and functional working environment at your service.") + _descriptionFields = (productName,) + sortPriority = 10000 + + if not Entropy().is_installed("lxde-base/lxde-common"): + 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) diff --git a/installclasses/xfce.py b/installclasses/xfce.py new file mode 100644 index 0000000..6f3cf5e --- /dev/null +++ b/installclasses/xfce.py @@ -0,0 +1,88 @@ +# +# xfce.py +# +# Copyright (C) 2010 Fabio Erculiani +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from installclass import BaseInstallClass +from constants import * +from product import * +from flags import flags +import os, types +import iutil + +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +import installmethod + +from sabayon import Entropy +from sabayon.livecd import LiveCDCopyBackend + +class InstallClass(BaseInstallClass): + + id = "sabayon_xfce" + name = N_("Sabayon XFCE") + + _pixmap_dirs = os.getenv("PIXMAPPATH", "/usr/share/pixmaps").split(":") + for _pix_dir in _pixmap_dirs: + _pix_path = os.path.join(_pix_dir, "xfce4.png") + if os.path.isfile(_pix_path): + pixmap = _pix_path + + dmrc = "xfce" + _description = N_("Select this installation type for a default installation " + "with the XFCE desktop environment. " + "A small lightweight and functional working environment at your service.") + _descriptionFields = (productName,) + sortPriority = 10000 + + if not Entropy().is_installed("xfce-base/xfce-utils"): + 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) -- cgit v1.2.3-65-gdbad