RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1651582 - Change of libdnf plugin interface
Summary: Change of libdnf plugin interface
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-20 11:45 UTC by Jaroslav Rohel
Modified: 2018-11-29 10:13 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-29 10:13:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Rohel 2018-11-20 11:45:14 UTC
Description of problem:
Change of libdnf plugin interface.

Additional info:
After some tests related to SWID work I made changes in libdnf plugin interface.
I want to merge the changes as soon as possible. I we would like to avoid making any API changes after GA.
There is PR https://github.com/rpm-software-management/libdnf/pull/642 which changes libdnf plugin interface.

Changes:
1. The pluginHook() function will get information about transaction in data argument, when it is called with id PLUGIN_HOOK_ID_CONTEXT_PRE_TRANSACTION or PLUGIN_HOOK_ID_CONTEXT_TRANSACTION. This additional information is needed because some applications (PackageKit) do not set the information in context.

2. Original interface uses untyped pointers (void*) for initData and hookData. It means that static type control was silently bypassed. So new data types DnfPluginInitData and DnfPluginHookData were declared. 

3. Data type DnfPluginError was declared. It replaces PluginHookError data type.

Internal structure of all new data types is hidden. Goal is safer and more extensible code.
Function for access new data types were defined:
DnfContext * pluginGetContext(DnfPluginInitData * data);
hookContextTransactionGetTransaction(DnfPluginHookData * data);
HyGoal hookContextTransactionGetGoal(DnfPluginHookData * data);
DnfState * hookContextTransactionGetState(DnfPluginHookData * data);

4. Test plugins were updated.

Comment 1 Jaroslav Rohel 2018-11-29 10:13:20 UTC
Based on feedback provided in bug#1601087 we have merged the PR.


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