Skip to content

Commit

Permalink
repoquery: unify package info printing by using PackageInfoSections
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura committed Jul 4, 2023
1 parent 1d46350 commit 6529344
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dnf5/commands/repoquery/repoquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include <dnf5/shared_options.hpp>
#include <libdnf5-cli/output/changelogs.hpp>
#include <libdnf5-cli/output/repoquery.hpp>
#include <libdnf5-cli/output/package_info_sections.hpp>
#include <libdnf5/advisory/advisory_query.hpp>
#include <libdnf5/conf/const.hpp>
#include <libdnf5/conf/option_string.hpp>
Expand Down Expand Up @@ -663,10 +664,10 @@ void RepoqueryCommand::run() {
libdnf5::cli::output::print_changelogs(
full_package_query, {libdnf5::cli::output::ChangelogFilterType::NONE, 0});
} else if (info_option->get_value()) {
for (auto package : full_package_query) {
libdnf5::cli::output::print_package_info_table(package);
std::cout << '\n';
}
auto out = libdnf5::cli::output::PackageInfoSections();
out.setup_cols();
out.add_section("", full_package_query);
out.print();
} else if (!pkg_attr_option->get_value().empty()) {
libdnf5::cli::output::print_pkg_attr_uniq_sorted(stdout, full_package_query, pkg_attr_option->get_value());
} else {
Expand Down

0 comments on commit 6529344

Please sign in to comment.