Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libdnf, actions plugin] Support for action options, option enabled and "plugin.version" variable #975

Conversation

jrohel
Copy link
Contributor

@jrohel jrohel commented Oct 13, 2023

The fourth item in the action definition has been reserved. It is now used to set additional action options. Options are separated by spaces. A space within an option can be written using escaping.

One option is now supported - enabled=<value>.
Supported values of value:

  • 1 - action is always enabled
  • host-only - the action is only enabled for operations on the host
  • installroot-only - the action is only enabled for operations in the alternative "installroot"

Action can allways be disabled by commenting out the action line.

PR also adds a new ${plugin.version} substitution. The expression is replaced by the actions plugin version.

@ppisar
Copy link
Contributor

ppisar commented Nov 3, 2023

Please change "libdnf5 plugin "actions": doc "plugin.version" var and "enabled" option" commit summary to "[libdnf5 plugin "actions"] doc "plugin.version" var and "enabled" option". All other commits use that format.

Or, what I would prefer, is dissolving this commit into commits which bring the features. E.g. "* ${plugin.version} - version of the actions plugin (added in version 0.3.0)" line should go to the very fist "[libdnf, actions plugin] Support for "plugin.version" variable" commit. Having documentation together which code in a single commit helps in archeology. Especially when someone will need to backport or revert the change.

The fourth item in the action definition has been reserved. It is now
used to set additional action options. Options are separated by spaces.
A space within an option can be written using escaping.

One option is now supported - `enabled=<value>`.
Supported values of `value`:
* `1` - action is always enabled
* `host-only` - the action is only enabled for operations on the host
* `installroot-only` - the action is only enabled for operations in
                       the alternative "installroot"

Action can allways be disabled by commenting out the action line.
"Enabled" can now be set for each action separately.
However, to enable actions, the "actions" plugin must be enabled.
If "enabled" for the "actions" plugin is set to `host-only`, the action
will not be performed for the alternate installroot even if it is enabled
for the action.
@jrohel jrohel force-pushed the feature/libdnf-actions-plugin-ena-ver branch from 6dbe292 to cfd5538 Compare November 8, 2023 14:28
@jrohel
Copy link
Contributor Author

jrohel commented Nov 8, 2023

I moved the documentation to commits with the implementation.

Copy link
Contributor

@ppisar ppisar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it's good.

@ppisar ppisar added this pull request to the merge queue Nov 8, 2023
Merged via the queue into rpm-software-management:main with commit 0b121a9 Nov 8, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

libdnf actions plugin: Possibility to set enabled for each action separately
2 participants