Bug 2231548

Summary: Errors on command line / dnf log when python3-dnf not installed
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: PackageKitAssignee: Neal Gompa <ngompa13>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: gnome-sig, rdieter, rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-12-16 17:06:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson 2023-08-11 19:47:53 UTC
PackageKit contains the notify_packagekit.py DNF plugin, which does `from dnfpluginscore import _`, but it has no dependency on python3-dnf-plugins-core . So you can get in a situation where you have PackageKit installed but not python3-dnf-plugins-core , and then you get errors like this on any dnf install:

2023-08-11T08:11:26-0400 ERROR Failed loading plugin "notify_packagekit": No module named 'dnfpluginscore'
2023-08-11T08:11:26-0400 SUBDEBUG 
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/dnf/plugin.py", line 214, in _import_modules
    module = importlib.import_module(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1293, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
  File "/usr/lib/python3.12/site-packages/dnf-plugins/notify_packagekit.py", line 27, in <module>
    from dnfpluginscore import _
ModuleNotFoundError: No module named 'dnfpluginscore'

Reproducible: Always

Steps to Reproduce:
1. Install PackageKit without python3-dnf-plugins-core
2. Install a package with dnf
Actual Results:  
Error is displayed and/or logged

Expected Results:  
No error

Comment 1 Fedora Release Engineering 2023-08-16 08:14:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Aoife Moloney 2024-11-08 11:01:40 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
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
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Adam Williamson 2024-11-08 16:58:23 UTC
This isn't exactly the same any more in current F41, but something similar is still the case. notify_packagekit.py no longer imports from dnfpluginscore , but it does do `import dnf`. The PackageKit package does not depend on python3-dnf (I just tested, and I can `dnf remove python3-dnf` without PackageKit going away). In the past you could pretty much assume python3-dnf was installed on any Fedora system as dnf needed it, but that is no longer the case, dnf 5 does not use python3-dnf . So PackageKit ought to depend on python3-dnf explicitly.

Comment 4 Fedora Admin user for bugzilla script actions 2025-03-26 01:38:59 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Fedora Admin user for bugzilla script actions 2025-07-23 01:27:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 6 Adam Williamson 2025-12-02 01:12:54 UTC
This message is a reminder that Fedora Linux 41 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 41 on 2025-12-15.
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
'version' of '41'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 41 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 7 Samyak Jain (RedHat) 2025-12-16 17:06:00 UTC
Fedora Linux 41 entered end-of-life (EOL) status on 2025-12-15.

Fedora Linux 41 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.