aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiktor w brodlo <wiktor@brodlo.net>2011-06-15 16:59:54 +0000
committerwiktor w brodlo <wiktor@brodlo.net>2011-06-15 16:59:54 +0000
commit2590d96369d0217e31dc2812690dde61dac417b5 (patch)
tree82276f787b08a28548e342c7921486f1acefab9f /installclasses
parentfirst commit (diff)
downloadanaconda-2590d96369d0217e31dc2812690dde61dac417b5.tar.gz
anaconda-2590d96369d0217e31dc2812690dde61dac417b5.tar.bz2
anaconda-2590d96369d0217e31dc2812690dde61dac417b5.zip
Initial import from Sabayon (ver 0.9.9.56)
Diffstat (limited to 'installclasses')
-rw-r--r--installclasses/Makefile.am24
-rw-r--r--installclasses/corecd.py90
-rw-r--r--installclasses/fluxbox.py89
-rw-r--r--installclasses/gnome.py90
-rw-r--r--installclasses/kde.py89
-rw-r--r--installclasses/lxde.py88
-rw-r--r--installclasses/xfce.py88
7 files changed, 558 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
+#
+# Author: David Cantrell <dcantrell@redhat.com>
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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 <http://www.gnu.org/licenses/>.
+#
+
+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)