core: allow legacy modules to be used in 'hpi module install' for backwards compatibility

but show warning

kinda hacky, but hopefully we will simplify it further when we have more such legacy modules
This commit is contained in:
Dima Gerasimov 2022-06-07 22:37:45 +01:00
parent dbd15a7ee8
commit 9720f3c683
3 changed files with 33 additions and 4 deletions

View file

@ -339,6 +339,9 @@ def _requires(modules: Sequence[str]) -> Sequence[str]:
mods = [module_by_name(module) for module in modules]
res = []
for mod in mods:
if mod.legacy is not None:
warning(mod.legacy)
reqs = mod.requires
if reqs is None:
error(f"Module {mod.name} has no REQUIRES specification")