amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
500 stars 37 forks source link

[Bug] - AttributeError: module 'libdnf.conf' has no attribute 'ConfigParser_substitute' in python3-dnf-plugin-post-transaction-actions-4.1.0-1.amzn2023.0.2.noarch #732

Open brainbug95 opened 2 weeks ago

brainbug95 commented 2 weeks ago

Describe the bug Using the Post transaction actions Plugin for DNF causes a python error when any action is configured.

Package python3-dnf-plugin-post-transaction-actions-4.1.0-1.amzn2023.0.2.noarch

To Reproduce Steps to reproduce the behavior:

  1. install package 'dnf install python3-dnf-plugin-post-transaction-actions'
  2. create an action e.g. '/etc/dnf/plugins/post-transaction-actions.d/99-some-dummy.action' *:in:/bin/true
  3. install something with dnf 'dnf install python3-bcrypt'
  4. See error Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/dnf/plugin.py", line 104, in _caller getattr(plugin, method)() File "/usr/lib/python3.9/site-packages/dnf-plugins/post-transaction-actions.py", line 146, in transaction command = self._replace_vars(ts_item, a_command) File "/usr/lib/python3.9/site-packages/dnf-plugins/post-transaction-actions.py", line 104, in _replace_vars result = libdnf.conf.ConfigParser_substitute(command, vardict) AttributeError: module 'libdnf.conf' has no attribute 'ConfigParser_substitute'

Fix There is already a fix for that exact problem in upstream dnf-plugins-core:

https://github.com/rpm-software-management/dnf-plugins-core/commit/8790cb373405ac