Bug 2231548 - Errors on command line / dnf log when python3-dnf-plugins-core installed
Summary: Errors on command line / dnf log when python3-dnf-plugins-core installed
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 39
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-11 19:47 UTC by Adam Williamson
Modified: 2023-08-16 08:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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