summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/__init__.py11
-rw-r--r--portato/constants.py3
-rw-r--r--portato/gui/utils.py5
3 files changed, 6 insertions, 13 deletions
diff --git a/portato/backend/__init__.py b/portato/backend/__init__.py
index 003feb7..b2a5a43 100644
--- a/portato/backend/__init__.py
+++ b/portato/backend/__init__.py
@@ -13,14 +13,10 @@
from __future__ import absolute_import
from ..helper import debug
-from ..constants import USE_CATAPULT
from .system_interface import SystemInterface
from .exceptions import BlockedException, PackageNotFoundException, DependencyCalcError, InvalidSystemError
-if USE_CATAPULT:
- SYSTEM = "catapult"
-else:
- SYSTEM = "portage" # the name of the current system
+SYSTEM = "portage" # the name of the current system
_sys = None # the SystemInterface-instance
class _Package (object):
@@ -45,8 +41,9 @@ def set_system (new_sys):
@type new_sys: string"""
global SYSTEM
- SYSTEM = new_sys
- load_system()
+ if new_sys != SYSTEM:
+ SYSTEM = new_sys
+ load_system()
def load_system ():
"""Loads the current chosen system.
diff --git a/portato/constants.py b/portato/constants.py
index 93e4240..3d7217f 100644
--- a/portato/constants.py
+++ b/portato/constants.py
@@ -22,8 +22,6 @@ These should be set during the installation.
@type HOME: string
@var SU_COMMAND: command to execute to "su"
@type SU_COMMAND: string
-@var USE_CATAPULT: use the catapult backend or the normal ones
-@type USE_CATAPULT: boolean
@var CONFIG_DIR: The configuration directory.
@type CONFIG_DIR: string
@@ -58,7 +56,6 @@ APP = "portato"
VERSION = "9999"
HOME = os.environ["HOME"]
SU_COMMAND = "gksu -D 'Portato'"
-USE_CATAPULT = False
# config
CONFIG_DIR = "/etc/portato/"
diff --git a/portato/gui/utils.py b/portato/gui/utils.py
index fd858e9..c4f25fa 100644
--- a/portato/gui/utils.py
+++ b/portato/gui/utils.py
@@ -24,7 +24,7 @@ from functools import wraps
# some backend things
from ..backend import flags, system, set_system
from ..helper import debug, info, set_log_level
-from ..constants import USE_CATAPULT, APP, LOCALE_DIR
+from ..constants import APP, LOCALE_DIR
# parser
from ..config_parser import ConfigParser
@@ -86,8 +86,7 @@ class Config (ConfigParser):
def modify_system_config (self):
"""Sets the system config.
@see: L{backend.set_system()}"""
- if not USE_CATAPULT:
- set_system(self.get("system"))
+ set_system(self.get("system"))
def modify_external_configs (self):
"""Convenience function setting all external configs."""