Bug 1324151

Summary: dnf list installed | grep @@commandline lists 1815 system packages
Product: [Fedora] Fedora Reporter: Flo H. <emailtoflorian>
Component: dnf-plugins-extrasAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bugzilla.somor, fedora, gbcox, gianvito, jkadlcik, jmracek, jv+fedora, kmansoft, mluscon, packaging-team-maint, pnemade, rpm-software-management, smercurio, vmukhame, zbyszek
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-plugins-extras-2.0.2-1.fc26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-09 16:00: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:
Attachments:
Description Flags
Output of dnf list installed | grep @@commandline none

Description Flo H. 2016-04-05 16:20:44 UTC
Created attachment 1143895 [details]
Output of dnf list installed | grep @@commandline

Description of problem:
Packages are marked to originate from @@commandline when they are actually from fedora repo.
I do have 1815 packages of the base OS system that are marked to be from @@commandline.

Version-Release number of selected component (if applicable):
dnf-0:1.1.7-2.fc23.noarch
rpm-0:4.13.0-0.rc1.12.fc23.x86_64

How reproducible:
Always.

Steps to Reproduce:
1."dnf list installed |grep @@commandline > list.txt"
2.See list.txt

Actual results:
see http://fpaste.org/349637/ or attachment

Expected results:
Just a few packages that I really installed manually.

Additional info:
Output of "dnf history userinstalled" is totally different, and lists just a few programs that I really installed manually.

Comment 1 Christian Stadelmann 2016-04-06 22:07:52 UTC
Packages updated by `dnf system-upgrade` are listed as "@@commandline" in `dnf list installed`. That probably is the cause.

Comment 2 Christian Stadelmann 2016-09-28 18:24:19 UTC
Same issue when ugrading from F24 to F25.

Comment 3 Zbigniew Jędrzejewski-Szmek 2016-10-06 17:32:08 UTC
*** Bug 1370087 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Admin XMLRPC Client 2017-02-13 21:14:57 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Jaroslav Mracek 2017-02-24 08:47:12 UTC
The problem should be fixed by refactor  of system-upgrade plugin. In future probably we can download packages to repository cache and after reboot run saved transaction with downloaded rpms. It should provide information about origin of installed rpms.

Comment 6 Arne 2017-06-20 23:42:10 UTC
Issue still persists when upgrading from Fedora 25 to Fedora 26 (Beta).

dnf reinstall fixes it for individual packages, for example:

dnf list GeoIP.x86_64
Last metadata expiration check: 12:07:09 ago on Tue 20 Jun 2017 21:15:47 AEST.
Installed Packages
GeoIP.x86_64                                                        1.6.11-1.fc26                                                        @@commandline

dnf reinstall GeoIP.x86_64

dnf list GeoIP.x86_64
Last metadata expiration check: 12:07:41 ago on Tue 20 Jun 2017 21:15:47 AEST.
Installed Packages
GeoIP.x86_64                                                           1.6.11-1.fc26                                                           @fedora

Comment 7 Jaroslav Mracek 2017-06-21 09:16:53 UTC
I created a pull-request that should help with issue (https://github.com/rpm-software-management/dnf-plugins-extras/pull/97).

Comment 8 Kostya Vasilyev 2017-07-17 21:50:17 UTC
Same here after upgrade from F25 to F26.

I used the documented / recommended upgrade method:

1 - sudo dnf system-upgrade download --refresh --releasever=26
2 - sudo dnf system-upgrade reboot

This is a real bummer, as I wanted to see what packages are installed from third party repos (rpmfusion, copr...).

Comment 9 Fedora Update System 2017-08-07 12:51:35 UTC
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 10 Christian Stadelmann 2017-08-07 16:47:26 UTC
(In reply to Fedora Update System from comment #9)
> dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an
> update to Fedora 26.
> https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Is this update expected to fix the bug for already updated Fedora instances, or will it only apply to system-upgrades ran after installing the update?

Comment 11 Jaroslav Mracek 2017-08-07 17:50:06 UTC
The patch doesn't have a power to rewrite a history, but with this patch ``dnf system-upgrade`` will store correct origin of packages after next Fedora system upgrade.

Comment 12 Christian Stadelmann 2017-08-07 18:39:25 UTC
(In reply to Jaroslav Mracek from comment #11)
> The patch doesn't have a power to rewrite a history, but with this patch
> ``dnf system-upgrade`` will store correct origin of packages after next
> Fedora system upgrade.

Thanks for this clarification.

Comment 13 Fedora Update System 2017-08-08 01:24:57 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 14 Fedora Update System 2017-08-09 16:00:25 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Steven Mercurio 2017-10-10 16:07:28 UTC
Is there a workaround to fix @@command repo RPMs to be correct fedora repo aside from dnf reinstall of all @@commandline packages after upgrade to FC26?

Comment 16 Jaroslav Mracek 2017-10-10 16:33:18 UTC
Not easy way, but after updates installing, the repo will change. Just wait till new updates appears.

Comment 17 Steven Mercurio 2017-10-10 16:59:41 UTC
(In reply to Jaroslav Mracek from comment #16)
> Not easy way, but after updates installing, the repo will change. Just wait
> till new updates appears.

As I just updated last week that may take a while so maybe just cron a reinstall of everything @@commandline.

Comment 18 Kostya Vasilyev 2017-10-10 17:50:57 UTC
I have fedora-updates and fedora-updates-testing repos enabled, and ...

... can confirm that at this time, if I do "dnf list installed", a bunch of packages are listed as sourced from "@@updates" and "@@updates-testing" (and @@rpmfusion-* which I also use).

Good :)