The DNF documentation desperately attempts to avoid actually saying anything :-(. For pluginpath it says:
List of directories that are searched for plugins to load. Plugins found in any of the directories in this configuration option are used. The default contains a Python version-specific path.
The installed /etc/dnf/dnf.conf file doesn't explicitly say anything about pluginpath, so it must be hard coded somewhere.
So what the heck is the actual contents of this pluginpath config setting on fedora 22? Where do I install a .py module if I'm trying to write my own plugin?
On Sun, 19 Jul 2015 14:07:40 -0400 Tom Horsley horsley1953@gmail.com wrote:
The DNF documentation desperately attempts to avoid actually saying anything :-(. For pluginpath it says:
List of directories that are searched for plugins to load. Plugins found in any of the directories in this configuration option are used. The default contains a Python version-specific path.
The installed /etc/dnf/dnf.conf file doesn't explicitly say anything about pluginpath, so it must be hard coded somewhere.
So what the heck is the actual contents of this pluginpath config setting on fedora 22? Where do I install a .py module if I'm trying to write my own plugin?
Maybe install a dnf plugin package. Then run rpm -q --files [plugin pkg name] to see where it put its files? Not an answer to your question, but might get you closer.
On 19 July 2015 at 22:34, stan stanl-fedorauser@vfemail.net wrote:
On Sun, 19 Jul 2015 14:07:40 -0400 Tom Horsley horsley1953@gmail.com wrote:
The DNF documentation desperately attempts to avoid actually saying anything :-(. For pluginpath it says:
List of directories that are searched for plugins to load. Plugins found in any of the directories in this configuration option are used. The default contains a Python version-specific path.
The installed /etc/dnf/dnf.conf file doesn't explicitly say anything about pluginpath, so it must be hard coded somewhere.
So what the heck is the actual contents of this pluginpath config setting on fedora 22? Where do I install a .py module if I'm trying to write my own plugin?
Maybe install a dnf plugin package. Then run rpm -q --files [plugin pkg name] to see where it put its files? Not an answer to your question, but might get you closer.
Or use "repoquery" so you don't have to install the package.
$ repoquery -q -l python-dnf-plugins-extras-local
[ ... snip yum deprecation warning ...]
/etc/dnf/plugins/local.conf /usr/lib/python2.7/site-packages/dnf-plugins/local.py /usr/lib/python2.7/site-packages/dnf-plugins/local.pyc /usr/lib/python2.7/site-packages/dnf-plugins/local.pyo /usr/share/man/man8/dnf.plugin.local.8.gz
Cheers,
Dave...
On Sun, 2015-07-19 at 14:07 -0400, Tom Horsley wrote:
The DNF documentation desperately attempts to avoid actually saying anything :-(. For pluginpath it says:
List of directories that are searched for plugins to load. Plugins found in any of the directories in this configuration option are used. The default contains a Python version-specific path.
The installed /etc/dnf/dnf.conf file doesn't explicitly say anything about pluginpath, so it must be hard coded somewhere.
So what the heck is the actual contents of this pluginpath config setting on fedora 22? Where do I install a .py module if I'm trying to write my own plugin?
Here they're in /usr/lib/python2.7/site-packages/dnf-plugins but I wouldn't regard that as stable once Python 3 becomes the default.
poc
On Sun, 19 Jul 2015 23:10:28 +0100 Patrick O'Callaghan wrote:
Here they're in /usr/lib/python2.7/site-packages/dnf-plugins but I wouldn't regard that as stable once Python 3 becomes the default.
Yea, I ran dnf under strace to see what directories it poked around in and that appears to be the only place it looks. I had hoped to see it looking in some additional place like /etc/dnf/dnf-plugins, but I didn't notice anything like that.
Anyway, I appear to have managed to write an "afterdnf" plugin that starts a background job to wait for the pid that ran the plugin to go away, then runs some hooks once dnf has exited. For adapting my "big hammer" to fedora 22:
On 07/19/2015 03:34 PM, Tom Horsley wrote:
That's a nice idea, but the hammer you're using is a tad puny, don't you think? If you want to use a really, really big hammer, consider using Lucifer's: https://en.wikipedia.org/wiki/Lucifer%27s_Hammer