Rename option to switch gather backend

Calling it gather_backend is similar to repoclosure_backend we already
have. It's also more obvious what it does.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-03-06 15:25:55 +01:00
parent 76cf4a7540
commit 5dd2b3947d
3 changed files with 14 additions and 9 deletions

View File

@ -531,10 +531,10 @@ Options
* With ``greedy_method = "build" ``pkg-b-provider-1`` and * With ``greedy_method = "build" ``pkg-b-provider-1`` and
``pkg-b-provider-2`` will be pulled in. ``pkg-b-provider-2`` will be pulled in.
**dnf_gather** = False **gather_backend** = ``yum``
(*bool*) -- When set to ``True``, DNF backend is used instead of YUM. This (*str*) -- Either ``yum`` or ``dnf``. This changes the entire codebase
changes the entire codebase doing dependency solving, so it can change the doing dependency solving, so it can change the result in unpredictable
result in unpredictable ways. ways.
Particularly the multilib work is performed differently by using Particularly the multilib work is performed differently by using
``python-multilib`` library. Please refer to ``multilib`` option to see the ``python-multilib`` library. Please refer to ``multilib`` option to see the

View File

@ -505,7 +505,11 @@ def _make_schema():
}, },
"gather_prepopulate": {"$ref": "#/definitions/str_or_scm_dict"}, "gather_prepopulate": {"$ref": "#/definitions/str_or_scm_dict"},
"gather_source_mapping": {"type": "string"}, "gather_source_mapping": {"type": "string"},
"dnf_gather": {"type": "boolean", "default": False}, "gather_backend": {
"type": "string",
"enum": ["yum", "dnf"],
"default": "yum",
},
"pkgset_source": { "pkgset_source": {
"type": "string", "type": "string",

View File

@ -119,10 +119,11 @@ def resolve_deps(compose, arch, variant):
tmp_dir = compose.paths.work.tmp_dir(arch, variant) tmp_dir = compose.paths.work.tmp_dir(arch, variant)
cache_dir = compose.paths.work.pungi_cache_dir(arch, variant) cache_dir = compose.paths.work.pungi_cache_dir(arch, variant)
# TODO: remove YUM code, fully migrate to DNF # TODO: remove YUM code, fully migrate to DNF
if compose.conf.get("dnf_gather", False): backends = {
get_cmd = pungi_wrapper.get_pungi_cmd_dnf 'yum': pungi_wrapper.get_pungi_cmd,
else: 'dnf': pungi_wrapper.get_pungi_cmd_dnf,
get_cmd = pungi_wrapper.get_pungi_cmd }
get_cmd = backends[compose.conf['gather_backend']]
cmd = get_cmd(pungi_conf, destdir=tmp_dir, name=variant.uid, cmd = get_cmd(pungi_conf, destdir=tmp_dir, name=variant.uid,
selfhosting=selfhosting, fulltree=fulltree, arch=yum_arch, selfhosting=selfhosting, fulltree=fulltree, arch=yum_arch,
full_archlist=True, greedy=greedy_method, cache_dir=cache_dir, full_archlist=True, greedy=greedy_method, cache_dir=cache_dir,