Allow building module in --offline module with dependencies from local repositories.

There are following changes introduced in this commit:

- The `koji_tag` of module builds imported from the local repositories
  is now in `repofile:///etc/yum.repos.d/some.repo` format to store the
  repository from which the module was imported to local MBS DB.
- The `koji_tag` of fake base module is set to empty `repofile://`
  and in `MockModuleBuilder` the `conf.base_module_repofiles` list
  is used as source for the repositories defining platform. We can't
  simply use single repository, because there might be fedora.repo
  and fedora-update.repo and so on.
- The list of default .repo files for platform are passed using the
  `-r` switch in `build_module_locally` `mbs-manager` command.
- The LocalResolver (subclass of DBResolver) is added which is used
  to resolve the build dependencies when building modules offline
  locally.
- The `MockModuleBuilder` enables the buildrequired modules and
  repositories from which they come in the mock config.

With this commit, it is possible to build testmodule locally
without any external infra.
This commit is contained in:
Jan Kaluza
2019-03-29 11:31:20 +01:00
committed by mprahl
parent e43d979bc8
commit 67a5a9d1b0
15 changed files with 263 additions and 32 deletions

View File

@@ -57,6 +57,7 @@ setup(name='module-build-service',
'mbs.resolver_backends': [
'mbs = module_build_service.resolver.MBSResolver:MBSResolver',
'db = module_build_service.resolver.DBResolver:DBResolver',
'local = module_build_service.resolver.LocalResolver:LocalResolver',
],
},
scripts=['client/mbs-cli'],