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 Jun 27, 2023
1 parent 0de89cc commit 1fc4791
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 @@ -28,6 +28,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 @@ -413,6 +414,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 1fc4791

Please sign in to comment.