Skip to content

Implementation of held/unheld functions for state pkg#60432

Merged
Ch3LL merged 6 commits intosaltstack:masterfrom
vzhestkov:held-unheld-implementation
Jun 2, 2022
Merged

Implementation of held/unheld functions for state pkg#60432
Ch3LL merged 6 commits intosaltstack:masterfrom
vzhestkov:held-unheld-implementation

Conversation

@vzhestkov
Copy link
Copy Markdown
Contributor

What does this PR do?

Implements held/unheld functions for state pkg module.
Examples:

sysstat:
  pkg.held: []
held-pkgs:
  pkg.held:
    - pkgs:
      - sysstat
      - vnstat: 1.17-bp153.1.18
held-pkgs-clear:
  pkg.held:
    - pkgs: []
    - replace: True
unheld-pkgs:
  pkg.unheld:
    - pkgs:
      - sysstat
      - vnstat: 1.17-bp153.1.18
      - test-package
unheld-all:
  pkg.unheld:
    - all: True

Implements list_holds function for zypperpkg module. The output is similar to yumpkg.list_holds. The only difference is that zypperpkg calculates the current locked packages from list_locks as the yum and zypper have different way of managing locks.

Improves hold function for zypperpkg to handle package version if specified.

@vzhestkov vzhestkov requested a review from a team as a code owner June 24, 2021 07:53
@vzhestkov vzhestkov requested review from Ch3LL and removed request for a team June 24, 2021 07:53
@vzhestkov vzhestkov force-pushed the held-unheld-implementation branch from cc0d23c to 1208cac Compare June 24, 2021 08:15
@vzhestkov vzhestkov force-pushed the held-unheld-implementation branch from 8bf386c to 968b304 Compare June 25, 2021 10:38
Copy link
Copy Markdown
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

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

this will require a changelog and test coverage

@vzhestkov vzhestkov requested a review from Ch3LL July 2, 2021 08:50
@vzhestkov vzhestkov force-pushed the held-unheld-implementation branch from ca38197 to 2ea5f00 Compare July 2, 2021 09:32
Comment thread salt/modules/zypperpkg.py Outdated
Comment thread salt/modules/zypperpkg.py Outdated
Comment thread salt/modules/zypperpkg.py Outdated
Comment thread salt/modules/zypperpkg.py Outdated
@vzhestkov vzhestkov requested a review from Ch3LL August 30, 2021 07:34
@garethgreenaway garethgreenaway added the Phosphorus v3005.0 Release code name and version label Apr 20, 2022
Comment thread salt/modules/zypperpkg.py Outdated
Comment thread salt/states/pkg.py Outdated
Comment thread salt/states/pkg.py Outdated
@garethgreenaway
Copy link
Copy Markdown
Contributor

@vzhestkov Some merge conflicts on this one and some requested changes.

@vzhestkov vzhestkov force-pushed the held-unheld-implementation branch 2 times, most recently from dafb8ee to 353c119 Compare May 27, 2022 09:45
vzhestkov added 4 commits May 27, 2022 13:16
Fix docs for held/unheld functions of pkg state

Remove ignoring retcode 104 in favour for PR#58552

Add `root` parameter to hold/unhold functions

Move `root` to functions signature

and add missing parameter description to held/unheld

Remove all_versions and ignore_no_matching_item

Add root to hold/unhold docstrings

Remove empty line
Add unit test for pkg.held/unheld state functions

Code formatting fix for the tests

Fix test formatting
@vzhestkov vzhestkov force-pushed the held-unheld-implementation branch from 353c119 to 51e2399 Compare May 27, 2022 10:16
Comment thread salt/modules/zypperpkg.py Outdated
Comment thread salt/states/pkg.py Outdated
Comment thread salt/states/pkg.py Outdated
@vzhestkov
Copy link
Copy Markdown
Contributor Author

@twangboy thanks a lot for taking care of it

@Ch3LL Ch3LL merged commit 60daaf5 into saltstack:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Phosphorus v3005.0 Release code name and version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants