Bug 1297058 - RFE: Please add a means of loading and using plugins to the dnf API
Summary: RFE: Please add a means of loading and using plugins to the dnf API
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-08 21:59 UTC by David Shea
Modified: 2016-06-25 22:50 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-22 22:09:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1114422 0 high CLOSED [rfe] Provide hooks functionality 2021-02-22 00:41:40 UTC

Internal Links: 1114422

Description David Shea 2016-01-08 21:59:34 UTC
Description of problem:
Currently plugins are only used when dnf is run through the CLI command, and there is no documented way to load or run plugins from python code. A means of using plugins from non-CLI code is necessary in order for plugins, in particular langpacks, to be used during anaconda installs. 

Version-Release number of selected component (if applicable):
python3-dnf-1.1.5-1.fc24.noarch

Comment 1 Honza Silhan 2016-01-11 13:23:26 UTC
So far we put the shared code of plugins into dnfpluginscorelib.

Comment 2 David Shea 2016-01-11 15:09:01 UTC
Isn't that more for code used by plugins? I'm not trying to write a plugin. I want to use existing plugins. As far as I can tell, the various calls to base.plugins.* in dnf/cli/cli.py and dnf/cli/main.py are what need to happen, but base.plugins and conf.plugins are not part of the API, and I have been having trouble figuring out what needs to happen where in anaconda since these methods are not documented.

Comment 3 Honza Silhan 2016-01-12 13:46:32 UTC
Is there any plugin aside from langpacks you would like to call from Python API?

Comment 4 David Shea 2016-01-12 14:24:17 UTC
(In reply to Jan Silhan from comment #3)
> Is there any plugin aside from langpacks you would like to call from Python
> API?

In Fedora, no. In RHEL, once everything gets to that point, probably. This could also be relevant to creators of spins and remixes, since yum was able to modify the packaging behavior (for all use cases) by including plugins.

Comment 5 Honza Silhan 2016-02-22 22:09:09 UTC
This report was about Anaconda supporting langpacks in DNF backend. The new guideline for langpacks using rich and weak dependencies of RPM will be effective soon [1] and Anaconda has the support already [2].

When another use case come up, feel free to reopen.

[1] https://fedorahosted.org/fpc/ticket/593#comment:18
[2] https://github.com/rhinstaller/anaconda/pull/484


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