rpm-software-management / dnf-plugins-extras

repository for DNF community plugins
GNU General Public License v2.0
65 stars 62 forks source link

post-transaction-actions not triggered #221

Open tdewolff opened 1 month ago

tdewolff commented 1 month ago

I've added the following line to /etc/dnf/dnf.conf:

pluginconfpath=/etc/dnf/plugins

I've create the file /etc/dnf/plugins/post-transaction-actions.conf:

[main]
enabled = 1
actiondir = /etc/dnf/plugins/post-transaction-actions.d/

I've created /etc/dnf/plugins/post-transaction-actions.d/test.action:

*:any:echo "DOES IT WORK?" >> /tmp/trans.log

But the action is never executed. I'm running CentOS Stream 8 and dnf-plugin-extras is installed. What could be wrong here?

dcantrell commented 3 weeks ago

What OS does this happen on? And what version of dnf?

tdewolff commented 3 weeks ago

Most likely I must have missed a configuration for this to work? Examples are scarce.

# hostnamectl
  ...
  Operating System: CentOS Stream 8
  Kernel: Linux 4.18.0-553.6.1.el8.x86_64
  ...
# dnf --version
4.7.0
  Installed: dnf-0:4.7.0-20.el8.noarch at Wed 17 Jan 2024 02:24:17 AM GMT
  Built    : builder@centos.org at Mon 16 Oct 2023 01:48:29 PM GMT

  Installed: rpm-0:4.14.3-31.el8.x86_64 at Wed 17 Jan 2024 02:23:59 AM GMT
  Built    : builder@centos.org at Wed 13 Dec 2023 02:00:08 PM GMT
dcantrell commented 1 week ago

On CentOS Stream 8, this will work if you install the python3-dnf-plugin-post-transaction-actions. I just confirmed it locally.