]> git.ipfire.org Git - pakfire.git/commitdiff
python: Drop "mode" in main class
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2021 16:30:24 +0000 (16:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2021 16:30:24 +0000 (16:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/base.py
src/pakfire/repository/__init__.py

index 15a88ee575a85bc1c4389052ccb0fc8d08008df1..c5d82e5b3f6b4474a982f4d8781272696b92732f 100644 (file)
@@ -40,7 +40,6 @@ from .i18n import _
 
 class Pakfire(_pakfire.Pakfire):
        __version__ = PAKFIRE_VERSION
-       mode = None
 
        def __init__(self, path="/", config=None, arch=None, distro=None, cache_path=None, offline=False):
                _pakfire.Pakfire.__init__(self, path, arch)
@@ -58,7 +57,7 @@ class Pakfire(_pakfire.Pakfire):
                self.check_root_user()
 
                # check if we are actually running on an ipfire system
-               if not self.mode and self.path == "/":
+               if self.path == "/":
                        self.check_is_ipfire()
 
                # Load configuration
@@ -354,8 +353,6 @@ class PakfireContext(object):
 
 
 class PakfireBuilder(Pakfire):
-       mode = "builder"
-
        def __init__(self, distro_name=None, *args, **kwargs):
                self.distro_name = distro_name
 
@@ -451,8 +448,6 @@ class PakfireBuilder(Pakfire):
 
 
 class PakfireServer(Pakfire):
-       mode = "server"
-
        def repo_create(self, path, input_paths, name=None, key_id=None, type="binary"):
                assert type in ("binary", "source",)
 
@@ -474,4 +469,4 @@ class PakfireServer(Pakfire):
 
 
 class PakfireKey(Pakfire):
-       mode = "key"
+       pass
index a8a1e1092f0f1b1b0e77d84472171e520807a15d..13d5d4b533402e9f061ece531c71b1f2f619d99d 100644 (file)
@@ -30,7 +30,7 @@ from .. import _pakfire
 from .. import config
 from .. import packages
 
-from .local import RepositoryDir, RepositoryBuild
+from .local import RepositoryDir
 from .system import RepositorySystem
 
 from ..i18n import _
@@ -52,11 +52,6 @@ class Repositories(object):
                self.local = self.pakfire.installed_repo = RepositorySystem(self.pakfire)
                self.add_repo(self.local)
 
-               # If we running in build mode, we include our local build repository.
-               if self.pakfire.mode == "builder":
-                       self.local_build = RepositoryBuild(self.pakfire)
-                       self.add_repo(self.local_build)
-
                self._load_from_configuration(self.pakfire.config)
 
        def __iter__(self):