Skip to content

Commit

Permalink
repoquery: --exactdeps needs --whatdepends or --whatrequires
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura committed Jul 24, 2023
1 parent 6be78f7 commit 0a2e8b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dnf5/commands/repoquery/repoquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
#include <libdnf5/rpm/package.hpp>
#include <libdnf5/rpm/package_query.hpp>
#include <libdnf5/rpm/package_set.hpp>
#include <libdnf5/utils/bgettext/bgettext-mark-domain.h>
#include <libdnf5/utils/patterns.hpp>

#include <iostream>
Expand Down Expand Up @@ -415,6 +416,10 @@ void RepoqueryCommand::configure() {
}
}
}
if (exactdeps->get_value() && (whatrequires->get_value().empty() && whatdepends->get_value().empty())) {
throw libdnf5::cli::ArgumentParserMissingDependentArgumentError(
M_("Option \"--exactdeps\" has to be used either with \"--whatrequires\" or \"--whatdepends\""));
}
}

void RepoqueryCommand::load_additional_packages() {
Expand Down

0 comments on commit 0a2e8b3

Please sign in to comment.