| Summary: | No difference in output from dnf list --available [pkg] and dnf list --installed [pkg] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | fropeter |
| Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | high | ||
| Version: | 24 | CC: | fropeter, ignatenko, jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, rpm-software-management, vmukhame |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-08 18:09:51 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: | |
|
Description
fropeter
2016-08-29 22:19:07 UTC
Maybe expected behaviour is a little unclear, hence this elaboration:
If the package is installed:
dnf list --available [pkg] should fail
~]$ dnf list --available gedit.x86_64
gedit.x86_64 is not available
~]$
exit code !=0
I see that the wording in the output might be confusing, but it is
the way the word 'available' is used in the documentation. Maybe the
wording should be different depending on whether the package is
installed or if it is in no known repo. The two results should
have different exit codes.
If the package is not installed, but available in a known repo:
dnf list --installed [pkg] should fail
~]$ dnf list --installed gedit.x86_64
gedit.x86_64 is not installed
~]$
exit code !=0
If used with globbing, only packages relevant to {--installed,--available} should be listed.
In all these cases there would not be a need for the "Installed Packages"
or "Available Packages" headings in the output.
We will investigate but the issue with return code, we will inherit from YUM behavior. Please, can you try dnf-2.0 from copt repo. Just use command ``dnf copr enable rpmsoftwaremanagement/dnf-nightly`` and then upgrade dnf to version 2.0. According to my investigation, the problem is solve in this upstream version. Even globing was working in format ``dnf list --available 'acp*' `` as expected. Probably it will be better to close the bug report but if you will experience the reported problem with dnf-2.0, please don't hesitate to reopen it and provide please fresh data. I tried dnf-2.0 from copt repo. [~]$ dnf list --installed gedit.x86_64 Unknown configuration value: failovermethod=roundrobin; 'roundrobin' value is not implemented Unknown configuration value: failovermethod=roundrobin; 'roundrobin' value is not implemented Unknown configuration value: failovermethod=roundrobin; 'roundrobin' value is not implemented Last metadata expiration check: 0:01:20 ago on Thu Sep 08 21:58:20 2016 CEST. Installed Packages gedit.x86_64 2:3.20.2-1.fc24 @fedora [~]$ echo $? 0 [~]$ It works, and I suppose the warnings will disappear in released code. Here are the rest of the results, without the warnings: [~]$ dnf list --available gedit.x86_64 Last metadata expiration check: 0:00:50 ago on Thu Sep 08 21:58:20 2016 CEST. Error: No matching Packages to list [~]$ echo $? 1 [~]$ [~]$ dnf list --installed gedit.i686 Last metadata expiration check: 0:13:12 ago on Thu Sep 08 21:58:20 2016 CEST. Error: No matching Packages to list [frode@localhost ~]$ echo $? 1 [~]$ [~]$ dnf list --available gedit.i686 Last metadata expiration check: 0:14:36 ago on Thu Sep 08 21:58:20 2016 CEST. Available Packages gedit.i686 2:3.20.2-1.fc24 fedora [frode@localhost ~]$ echo $? 0 [frode@localhost ~]$ I'd consider this fixed. Thank you! BTW: I suppose the copt version of dnf isn't safe to use for day to day use, correct? Will dnf 2.0 make the F25 deadline? Its Copr not copt :) |