diff --git a/osbuild/meta.py b/osbuild/meta.py index c1843aa0..ea1718ef 100644 --- a/osbuild/meta.py +++ b/osbuild/meta.py @@ -359,9 +359,10 @@ class ModuleInfo: @staticmethod def module_class_to_directory(klass: str) -> str: mapping = { - "Stage": "stages", "Assembler": "assemblers", - "Source": "sources" + "Input": "inputs", + "Source": "sources", + "Stage": "stages", } return mapping.get(klass) @@ -419,7 +420,7 @@ class Index: with contextlib.suppress(FileNotFoundError): with open(path, "r") as f: schema = json.load(f) - elif klass in ["Stage", "Assembler", "Source"]: + elif klass in ["Assembler", "Input", "Source", "Stage"]: info = self.get_module_info(klass, name) if info: schema = info.schema diff --git a/test/mod/test_osbuild.py b/test/mod/test_osbuild.py index a5f65b72..0b5bdf79 100644 --- a/test/mod/test_osbuild.py +++ b/test/mod/test_osbuild.py @@ -124,7 +124,7 @@ class TestDescriptions(unittest.TestCase): index = osbuild.meta.Index(os.curdir) modules = [] - for klass in ("Stage", "Assembler", "Source"): + for klass in ("Assembler", "Input", "Source", "Stage"): mods = index.list_modules_for_class(klass) modules += [(klass, module) for module in mods]