Bug 1938352

Summary: Fix documentation: repository-packages
Product: [Fedora] Fedora Reporter: Thiago Sueto <herzenschein>
Component: dnfAssignee: amatej
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 34CC: amatej, dmach, jmracek, jrohel, mblaha, mhatina, ngompa13, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.9.0-1.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-24 20:32:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1665453    

Description Thiago Sueto 2021-03-12 20:57:10 UTC
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.

Comment 1 amatej 2021-03-15 13:55:19 UTC
I made a PR proposing a documentation fix: https://github.com/rpm-software-management/dnf/pull/1745

FWIW, I like the --repo option for this use case, it seems to be pretty much the equivalent of --from. :)

Comment 2 Fedora Update System 2021-09-23 13:04:46 UTC
FEDORA-2021-a3a73697b8 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3a73697b8

Comment 3 Fedora Update System 2021-09-23 19:41:46 UTC
FEDORA-2021-a3a73697b8 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a3a73697b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3a73697b8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2021-09-24 20:32:25 UTC
FEDORA-2021-a3a73697b8 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.