Bug 1234491 - [UX] dnf list installed: show repo id the package was installed from
[UX] dnf list installed: show repo id the package was installed from
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-22 12:07 EDT by Alan Stern
Modified: 2015-10-05 17:53 EDT (History)
7 users (show)

See Also:
Fixed In Version: dnf-1.1.2-4.fc23 dnf-1.1.2-4.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-04 15:13:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1055132 None None None Never

  None (edit)
Description Alan Stern 2015-06-22 12:07:57 EDT
Description of problem:  The "dnf list available" command doesn't list packages that are currently installed.  According to the man page for dnf, a package is supposed to be "available" if it is present in a repository that dnf knows about -- whether or not it is installed should be irrelevant.


Version-Release number of selected component (if applicable):
dnf-1.0.0-1.fc22.noarch


How reproducible:  100%


Steps to Reproduce:  Here's an example.  On my system, bash was installed (by fedup, upgrading from Fedora 20) from the "fedora" repository:

# dnf list installed bash
Last metadata expiration check performed 0:26:56 ago on Mon Jun 22 11:02:39 2015.
Installed Packages
bash.i686                         4.3.39-1.fc22                          @System

The output says "@System" rather than "fedora"; it does this for all installed packages no matter where they came from.  Why?

# dnf list available bash
Last metadata expiration check performed 0:35:45 ago on Mon Jun 22 11:02:39 2015.
Error: No matching Packages to list

This is wrong -- obviously the bash package is available in the fedora repo.

The "dnf repository-packages <repoid> list available" command has the same bug.  Even worse, "dnf repository-packages <repoid> list installed" lists only a few of the packages that should be there.  Example:

# dnf repository-packages fedora list installed | more
Last metadata expiration check performed 1:00:37 ago on Mon Jun 22 11:02:39 2015.
Installed Packages
gnupg.i686                              1.4.19-1.fc22                    @System
ipsec-tools.i686                        0.8.1-6.fc22                     @System
python3-rpmconf.noarch                  1.0.7-1.fc22                     @System
rpm-python3.i686                        4.12.0.1-9.fc22                  @System
rpmconf.noarch                          1.0.7-1.fc22                     @System
rpmconf-base.noarch                     1.0.7-1.fc22                     @System

That's all!  Even though there are over 2600 packages installed on this machine, most of which come from the fedora repository (I assume -- there doesn't seem to be any way to tell for certain.)
Comment 1 Honza Silhan 2015-07-01 05:43:20 EDT
It seems like also in the yum in, the list command the term "available" means "available in repositories while not being installed". List is just brief overview of packages thats why there are not duplicated from installed category. For listing all packages in repos regardless whether thy are installed or not one should use "dnf repoquery" (from dnf-plugins-core package that should be installed by default). With respect, I am changing this bug report to "show repo the package was installed from" as your second use case could be solved by "dnf repoquery".
Comment 2 Alan Stern 2015-07-01 10:46:02 EDT
Okay, I tried "dnf repoquery" and it worked.  Thanks.

Still, I think the man pages need to be fixed.  They should explain the correct meaning of "available"; as it stands the explanation is wrong.

For example, in the "List Command" subsection of the man page for "dnf", it says:

       Generally packages are available (it is present in a repository we
       know  about)  or installed (present in the RPMDB).

It should say something like this:

       A package is installed if it is present in the RPMDB, and it is available
       if it is not installed but it is present in a repository that dnf knows
       about.

The explanations for the "dnf  [options]  repository-packages  <repoid>  info  available" and "dnf  [options]  repository-packages  <repoid>  list  available" commands should say that they

       List packages available in the repository but not currently installed
       on the system.
Comment 3 Honza Silhan 2015-07-03 14:07:45 EDT
Thanks for exact sentences -> fixed in the upstream.
Comment 4 Honza Silhan 2015-07-07 05:19:48 EDT
* only the doc part was fixed in https://github.com/rpm-software-management/dnf/commit/8876b30dc10cca975a83414acd30c40f85c11ae6

The output of installed repo names is not yet implemented.
Comment 5 Fedora Update System 2015-09-22 11:00:48 EDT
hawkey-0.6.1-1.fc23 dnf-plugins-core-0.1.12-2.fc23 dnf-1.1.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
Comment 6 Fedora Update System 2015-09-22 11:02:56 EDT
dnf-plugins-core-0.1.12-2.fc22 hawkey-0.6.1-1.fc22 dnf-1.1.2-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
Comment 7 Fedora Update System 2015-09-22 23:54:33 EDT
dnf-1.1.2-2.fc23, dnf-plugins-core-0.1.12-2.fc23, hawkey-0.6.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugins-core dnf hawkey'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
Comment 8 Fedora Update System 2015-09-23 17:22:25 EDT
dnf-1.1.2-2.fc22, dnf-plugins-core-0.1.12-2.fc22, hawkey-0.6.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugins-core dnf hawkey'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
Comment 9 Fedora Update System 2015-10-02 11:20:33 EDT
dnf-plugins-core-0.1.12-3.fc23 hawkey-0.6.1-2.fc23 dnf-1.1.2-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
Comment 10 Fedora Update System 2015-10-02 11:24:35 EDT
dnf-plugins-core-0.1.12-3.fc22 hawkey-0.6.1-2.fc22 dnf-1.1.2-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
Comment 11 Fedora Update System 2015-10-03 21:36:09 EDT
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
Comment 12 Fedora Update System 2015-10-03 21:52:03 EDT
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
Comment 13 Fedora Update System 2015-10-04 15:12:54 EDT
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2015-10-05 17:52:23 EDT
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.