dnf5: Support --installed-from-repo= for "do"

This commit is contained in:
Jaroslav Rohel 2025-07-22 23:45:03 +02:00
parent edb3286dc3
commit 9c235221d8
2 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,7 @@ void DoCommand::set_argument_parser() {
cmd.register_named_arg(item_type_opt);
}
create_installed_from_repo_option(*this, installed_from_repos, false);
create_from_repo_option(*this, from_repos, false);
{
@ -101,6 +102,7 @@ void DoCommand::set_argument_parser() {
int argc,
const char * const argv[]) {
libdnf5::GoalJobSettings settings;
settings.set_from_repo_ids(installed_from_repos);
settings.set_to_repo_ids(from_repos);
switch (action) {
case Action::INSTALL:

View File

@ -44,6 +44,7 @@ private:
enum class ItemType { AUTO, PACKAGE, GROUP, ENVIRONMENT } item_type{ItemType::AUTO};
std::vector<std::string> installed_from_repos;
std::vector<std::string> from_repos;
std::string group_spec(ItemType type, const std::string & spec, libdnf5::GoalJobSettings & settings);