Bug 1117102

Summary: [doc] configuring plugin search directories
Product: [Fedora] Fedora Reporter: Jakub Kadlčík <jkadlcik>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: akozumpl, jzeleny, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: hawkey-0.4.18-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-19 06:03:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Kadlčík 2014-07-08 04:01:16 UTC
I think it would be nice that DNF should always search for plugins in system directory and as extra search plugins in directory specified by `pluginpath` variable. Can you consider it, please?


Description:
It would make installation of third-party plugins a bit easier. For instance, someone (me) creates some plugin. I create a package dnf-foo-plugin for it. That package will perform necessary things and copy foo.py into /usr/lib/python2.7/site-packages/dnf-plugins/ . With default fedora installation  (and recent DNF) plugin should be ready to use, but when someone (other plugin developers, plugin users from git, ...) has set different `pluginpath` in dnf.conf, my plugin will not work and there will be necessary user effort to copy it to his `pluginpath`


Suggestion:
Every time check what plugins are in /usr/lib/.../dnf-plugins/ . Next check if `pluginpath` is set to different directory and check its plugins. When some has same name, prefer that one from specified `pluginpath`. 


Expection:
Everyone who creates DNF plugin would copy his plugin into /usr/lib/.../dnf-plugins and be sure that it will work


What do you think? :-)

Comment 1 Ales Kozumplik 2014-07-08 06:07:24 UTC
Hello,

if I understand this correctly it involves some non-trivial manipulation of the 'pluginpath' configuration default which would make this hard to document cleanly and thus harder for users to comprehend. And we shouldn't compromise ease of use for developer convenience's sake.

However, I documented the 'pluginpath' configuration option in 16ccbc5 and I believe tweaking it should allow something similar to what is described in comment 0.

Comment 2 Jakub Kadlčík 2014-07-08 06:34:45 UTC
Thank you Aleš,

I just realized that `pluginpath` is actually list of paths, not only one path, so you have right, it should be solvable specifing both paths - to /usr and anywhere to arbitrary plugins. I am sorry, my fault.

I just tried it and found that paths can separated by commas, but I think it is not mentioned in docs. Can you please write some note there? Also I think people would be interested about paths order (which one has biggest priority? first/last).

Comment 3 Fedora Update System 2014-07-17 06:42:42 UTC
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hawkey-0.4.18-2.fc20,dnf-0.5.4-1.fc20,libsolv-0.6.4-0.git2a5c1c4.fc20

Comment 4 Fedora Update System 2014-07-19 06:03:13 UTC
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.