Bug 1525645

Summary: "dnf list --installed" shows @System as the repository for every package unless run as root
Product: [Fedora] Fedora Reporter: Pavel Roskin <plroskin>
Component: dnfAssignee: Marek Blaha <mblaha>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dmach, jmracek, mblaha, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-27 14:27:55 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:

Description Pavel Roskin 2017-12-13 19:25:18 UTC
Description of problem:

"dnf list --installed" used to be a useful tool to find out where the installed packages come from. I could run "dnf list --installed | grep testing" to see if I had any testing packages installed. That functionality is described at
https://unix.stackexchange.com/questions/22560/list-all-rpm-packages-installed-from-repo-x

At some point, that functionality has been lost. "dnf list --installed" shows @System in the third column for every package.

When dnf is run as root, the repositories are shown correctly.

Version-Release number of selected component (if applicable):

dnf-2.7.5-2.fc27.noarch

How reproducible:

Every time

Steps to Reproduce:
1. Run "dnf list --installed | grep grep"

Actual results:
grep.x86_64    3.1-3.fc27     @System

Expected results:

grep.x86_64    3.1-3.fc27     @fedora

Additional info:

The same behavior is observed when "dnf repository-packages updates --installed list" is run. It returns nothing when run as unprivileged user, but returns the list of updates when run as root.

I have an up-to-date Fedora 27 x86_64 with updates and updates-testing repositories installed.

Comment 1 Marek Blaha 2017-12-18 14:35:12 UTC
It looks like you do not have access (as a regular user) to yumdb, which is located in /var/lib/dnf/yumdb directory by default (you can change the location by persistdir option in the config file). Please, check your permissions on this directory - you will need read and execute permission at least.

Comment 2 Ben Cotton 2018-11-27 14:19:10 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Jaroslav Mracek 2018-11-27 14:27:55 UTC
I am unable to reproduce it with dnf-4.0.4 available in Fedora 29. I am sorry, but we cannot rebase dnf in Fedora 27 or 28 (compatibility reasons).