Actual results:
The current documentation states:
dnf [options] repository-packages <repoid> install [<package-spec>...]
Install all packages in the repository.
Expected results:
dnf [options] repository-packages <repoid> install [<package-spec>...]
Install package from a specific repository.
dnf [options] repository-packages <repoid> install
Install all packages in the repository.
Description of problem:
Because of this lack of documentation, coming from zypper, I thought there was no equivalent option to zypper install/update/dup --from.
This initially led me to believe the only way to simulate the same behavior was by using --disablerepo, which requires knowing the repository from which a given package would be taken from beforehand. Moreover, --disablerepo does not ensure that the package will be taken from the desired repository. Thus, if you have many repos, it's possible that you'll need to type several --disablerepo instances, making the command particularly long.
dnf repository-packages <repoid> install <package> however does exactly the same and is safer and quicker than --enablerepo and --disablerepo overall. It should be made clearer in the dnf man pages.
I'd also argue that this is a more common example than installing all packages from a specific repository, as the latter usually fails since repositories tend to have conflicting packages as well as dependencies from other repositories. From what I understand, it only works with small repositories.
Actual results: The current documentation states: dnf [options] repository-packages <repoid> install [<package-spec>...] Install all packages in the repository. Expected results: dnf [options] repository-packages <repoid> install [<package-spec>...] Install package from a specific repository. dnf [options] repository-packages <repoid> install Install all packages in the repository. Description of problem: Because of this lack of documentation, coming from zypper, I thought there was no equivalent option to zypper install/update/dup --from. This initially led me to believe the only way to simulate the same behavior was by using --disablerepo, which requires knowing the repository from which a given package would be taken from beforehand. Moreover, --disablerepo does not ensure that the package will be taken from the desired repository. Thus, if you have many repos, it's possible that you'll need to type several --disablerepo instances, making the command particularly long. dnf repository-packages <repoid> install <package> however does exactly the same and is safer and quicker than --enablerepo and --disablerepo overall. It should be made clearer in the dnf man pages. I'd also argue that this is a more common example than installing all packages from a specific repository, as the latter usually fails since repositories tend to have conflicting packages as well as dependencies from other repositories. From what I understand, it only works with small repositories.