Bug 1898968
| Summary: | Listing an installed package from a specific repository not operational | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | ricky.tigg |
| Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | dmach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-4.5.2-1.fc33 dnf-4.5.2-1.fc32 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-01-06 01:21:41 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: | |||
I created a new attribute for package class - https://github.com/rpm-software-management/dnf/pull/1692 Now you can use: dnf rq -a --installed --qf "%{name} %{_from_repo}" | grep -i 'updates-testing*$' In future you can use: dnf rq -a --installed --qf "%{name} %{from_repo}" | grep -i 'updates-testing*$' Hello. Confirmed.
$ dnf rq -a --installed --qf "%{name} %{_from_repo}" | grep ^time
time @updates-testing
Did you observe 'dnf rq -a --installed --qf "%{name} %{ui_from_repo}" 'returned at least the packages belonging to repository System?
I am proposing additional change: https://github.com/rpm-software-management/dnf/pull/1695. (In reply to ricky.tigg from comment #2) > Hello. Confirmed. > > $ dnf rq -a --installed --qf "%{name} %{_from_repo}" | grep ^time > time @updates-testing > > Did you observe 'dnf rq -a --installed --qf "%{name} %{ui_from_repo}" > 'returned at least the packages belonging to repository System? Not sure that I understand correctly but ui_from_repo returns Id of repository the package belongs to (@System for installed packages). It means that everything what was installed is in repository with ID @system. I also do not recommend to use `ui_from_repo` because it is a compatibility option. I would recommend to use `repomane` instead. Attribute '%{reponame}' behaves unexpectedly like attribute '%{ui_from_repo}'! Wasn't attribute '%{reponame}' meant to behave like the coming attribute '%{from_repo}' as your recommendation implicitly suggested?
$ dnf rq -a --installed --qf '%{name} %{_from_repo} %{ui_from_repo} %{reponame}' | grep ^time
time @updates-testing @System @System
Attribute '%{reponame}' must behave like '%{ui_from_repo}'. `ui_from_repo` is only compatibility attribute. Hoe it behaves:
Attribute '%{reponame}' return name of repository that package belongs to.
For available packages
$ dnf rq -a --available --qf "%{name} %{reponame}"
For installed packages it returns `@System` because `@System` is name of repository with installed packages.
$ dnf rq -a --installed --qf "%{name} %{reponame}"
The new attribute `from_repo` (not yet available) - for installed packages it will return id of repository from which the package was installed if such information is available in the history database. Otherwise returns an empty string.
FEDORA-2020-4f53b68751 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4f53b68751 FEDORA-2020-152c03e942 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-152c03e942 FEDORA-2020-152c03e942 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-152c03e942` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-152c03e942 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-4f53b68751 has been pushed to the Fedora 32 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4f53b68751` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4f53b68751 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. Suggested command does not lead to installatio. Is the behavior similar in on your system? # dnf -y upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4f53b68751 Last metadata expiration check: 0:35:08 ago on Mon Dec 7 09:59:52 2020. No security updates needed, but 9 updates available Dependencies resolved. Nothing to do. Complete! Command operational after re-installation of the OS. FEDORA-2020-152c03e942 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-4f53b68751 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: listing an installed package from a specific repository is not operational. Version-Release number of component: dnf.noarch 4.4.0 How reproducible: Existence of a testing package for a component. Steps to Reproduce: # dnf -qy --best --enablerepo=updates-testing install time $ dnf rq -a --installed --qf "%{name} %{ui_from_repo}" | grep -i 'updates-testing*$' Actual result: no output from repository query Expected result: eligible package for listing to be listed Additional info: $ dnf -q repo-pkgs updates-testing list installed | sed 1d time.x86_64 1.9-12.fc33 @updates-testing