diff --git a/pungi/phases/pkgset/__init__.py b/pungi/phases/pkgset/__init__.py
index 66fa4952..684f6e95 100644
--- a/pungi/phases/pkgset/__init__.py
+++ b/pungi/phases/pkgset/__init__.py
@@ -29,13 +29,10 @@ class PkgsetPhase(PhaseBase):
self.path_prefix = None
def run(self):
- pkgset_source = "PkgsetSource%s" % self.compose.conf["pkgset_source"]
- from .source import PkgsetSourceContainer
from . import sources
- PkgsetSourceContainer.register_module(sources)
- container = PkgsetSourceContainer()
- SourceClass = container[pkgset_source]
+ SourceClass = sources.ALL_SOURCES[self.compose.conf["pkgset_source"].lower()]
+
self.package_sets, self.path_prefix = SourceClass(self.compose)()
def validate(self):
diff --git a/pungi/phases/pkgset/source.py b/pungi/phases/pkgset/source.py
index 472b4400..297d499e 100644
--- a/pungi/phases/pkgset/source.py
+++ b/pungi/phases/pkgset/source.py
@@ -14,15 +14,6 @@
# along with this program; if not, see .
-import kobo.plugins
-
-
-class PkgsetSourceBase(kobo.plugins.Plugin):
+class PkgsetSourceBase(object):
def __init__(self, compose):
self.compose = compose
-
-
-class PkgsetSourceContainer(kobo.plugins.PluginContainer):
- @classmethod
- def normalize_name(cls, name):
- return name.lower()
diff --git a/pungi/phases/pkgset/sources/__init__.py b/pungi/phases/pkgset/sources/__init__.py
index e69de29b..b3bcba8c 100644
--- a/pungi/phases/pkgset/sources/__init__.py
+++ b/pungi/phases/pkgset/sources/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+
+
+# 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; version 2 of the License.
+#
+# 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 Library 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 .source_koji import PkgsetSourceKoji
+from .source_repos import PkgsetSourceRepos
+
+ALL_SOURCES = {
+ "koji": PkgsetSourceKoji,
+ "repos": PkgsetSourceRepos,
+}
diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py
index a557f604..5e96a5be 100644
--- a/pungi/phases/pkgset/sources/source_koji.py
+++ b/pungi/phases/pkgset/sources/source_koji.py
@@ -184,8 +184,6 @@ def get_koji_modules(compose, koji_wrapper, event, module_info_str):
class PkgsetSourceKoji(pungi.phases.pkgset.source.PkgsetSourceBase):
- enabled = True
-
def __call__(self):
compose = self.compose
koji_profile = compose.conf["koji_profile"]
diff --git a/pungi/phases/pkgset/sources/source_repos.py b/pungi/phases/pkgset/sources/source_repos.py
index 3d3701bb..63c7c4ec 100644
--- a/pungi/phases/pkgset/sources/source_repos.py
+++ b/pungi/phases/pkgset/sources/source_repos.py
@@ -31,8 +31,6 @@ import pungi.phases.pkgset.source
class PkgsetSourceRepos(pungi.phases.pkgset.source.PkgsetSourceBase):
- enabled = True
-
def __call__(self):
package_sets, path_prefix = get_pkgset_from_repos(self.compose)
return (package_sets, path_prefix)