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

Pacman: Add support for install reason #4956

Merged
merged 20 commits into from
Jul 31, 2022

Conversation

Minei3oat
Copy link
Contributor

@Minei3oat Minei3oat commented Jul 15, 2022

SUMMARY

Pacman allows setting the install reason of packages. This PR adds this feature to the pacman module.

By default, no reason is explicitly set and the default behaviour of pacman is left untouched.

reason_for: all sets the install reason for all packages and represents the behavior of pacman when --asdeps or --asexplicit are specified.

reason_for: new; reason: dependency is a combination which is, as far as I know, not possible with pacman but very useful, as this enables specifying all wanted optional dependencies of a package without setting the already explicitly installed ones to dependency.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

pacman

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor os packaging plugins plugin (any type) needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 15, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Please note that you need to include a changelog fragment. I've included some first comments below.

plugins/modules/packaging/os/pacman.py Outdated Show resolved Hide resolved
plugins/modules/packaging/os/pacman.py Show resolved Hide resolved
plugins/modules/packaging/os/pacman.py Show resolved Hide resolved
plugins/modules/packaging/os/pacman.py Outdated Show resolved Hide resolved
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Jul 15, 2022
@felixfontein
Copy link
Collaborator

CC @jraby

@github-actions
Copy link

github-actions bot commented Jul 15, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@jraby
Copy link
Contributor

jraby commented Jul 15, 2022

I agree with felix, we should try yo avoid calling pacman in a loop. (The module was just rewritten to avoid this).
I also think that no specifying the new parameter should simply let pacman do its default thing, without passing the value explicitly.

Thanks for your contribution!

@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the tests tests label Jul 18, 2022
This was referenced Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request integration tests/integration module module os packaging plugins plugin (any type) tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants