pkgset: Download packages with dnf

When using repos as gather_source, we should use DNF backend even for
constructing initial package set and to download the packages from
source repos. Without this the repos source would not be usable on
Python 3.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-08-14 14:15:18 +02:00
parent be4501c54b
commit c3b49f7ffb
4 changed files with 43 additions and 3 deletions

View file

@ -28,6 +28,11 @@ def get_parser():
required=True,
help="path to kickstart config file",
)
parser.add_argument(
"--download-to",
metavar='PATH',
help="download packages to given directory instead of just printing paths",
)
group = parser.add_argument_group("Repository options")
group.add_argument(
@ -130,7 +135,10 @@ def main(persistdir, cachedir):
g.gather(packages, conditional_packages)
print_rpms(g)
if ns.download_to:
g.download(ns.download_to)
else:
print_rpms(g)
if ns.profiler:
Profiler.print_results()