#11 Refactor to eliminate redundant distro conf files and ease of use
Merged by ngompa. Opened by salimma.
salimma/rpmdistro-repoquery refactor-dedup  into  main

Download 11.patch

The various *.conf are all identical except for centos-legacy.conf
which was not configured to use caching yet.

Collapse them into a single dnf.conf, and also allow users to specify
only the distro name (in which case the repos are assumed to be at
/usr/share/rpmdistro-repoquery/distros) or a full path.

Also add a usage guide if the script is called without at least 3
arguments.

Tests (added echo to output the command):

rpmdistro-repoquery on  main [✘»!]
❯ ./rpmdistro-repoquery fedora 37 foo bar
dnf --config=/usr/share/rpmdistro-repoquery/dnf.conf --setopt=reposdir=/usr/share/rpmdistro-repoquery/distros/fedora --releasever=37 --nogpgcheck repoquery foo bar
rpmdistro-repoquery on  main [✘»!]
❯ ./rpmdistro-repoquery ./distros/fedora/ 37 foo bar
dnf --config=./distros/dnf.conf --setopt=reposdir=./distros/fedora --releasever=37 --nogpgcheck repoquery foo bar

Signed-off-by: Michel Alexandre Salim salimma@fedoraproject.org

:thumbsup:

Pull-Request has been merged by ngompa

Metadata