Skip to content

Add support for name, pkgs and diff_attr parameters to zypperpkg.upgrade()/yumpkg.upgrade() - #62033

Merged
Ch3LL merged 4 commits into
saltstack:masterfrom
agraul:zypper-upgrade-name-pkgs
Oct 6, 2022
Merged

Add support for name, pkgs and diff_attr parameters to zypperpkg.upgrade()/yumpkg.upgrade()#62033
Ch3LL merged 4 commits into
saltstack:masterfrom
agraul:zypper-upgrade-name-pkgs

Conversation

@agraul

@agraul agraul commented May 6, 2022

Copy link
Copy Markdown
Contributor

What does this PR do?

Add diff_attr to yumpkg.upgrade() and add it, together with name and pkgs, to zypperpkg.upgrade().

What issues does this PR fix or reference?

Fixes: #62030
Fixes: #62031
Fixes: #62032

Previous Behavior

name and pkgs parameters are ignored in zypperpkg.upgrade(). The diff_attr parameter is ignored by both yumpkg.upgrade() and zypperpkg.upgrade()

New Behavior

name and pkgs parameters are used in zypperpkg.upgrade to only update/upgrade the specified package(s). diff_attr is used by zypperpkg.upgrade() and yumpkg.upgrade() to output additional attributes.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@agraul
agraul requested a review from a team as a code owner May 6, 2022 11:24
@agraul
agraul requested review from krionbsd and removed request for a team May 6, 2022 11:24
SchoolGuy
SchoolGuy previously approved these changes May 6, 2022

@SchoolGuy SchoolGuy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have debugged this together with @agraul. The PR is LGTM for me.

@Ch3LL

Ch3LL commented Sep 20, 2022

Copy link
Copy Markdown
Contributor

looks like there is a test failure that might be related to this change

@agraul

agraul commented Sep 30, 2022

Copy link
Copy Markdown
Contributor Author

looks like there is a test failure that might be related to this change

After rebasing the PR on top of the current master commit, I don't see the test failure locally anymore. Let's see if jenkins' test executions agree.

Comment thread salt/modules/yumpkg.py Outdated
@Ch3LL Ch3LL added Sulfur v3006.0 release code name and version and removed has-failing-test labels Sep 30, 2022
agraul added 4 commits October 6, 2022 12:58
pkg_resource.format_pkg_list expects its `attr` argument to be either a
list of attributes or the string "all" to indicate all available
attributes should be used for formatting.

Fixes: saltstack#62032
diff_attr works just like it does for pkg.install. Having the
option to return additional attributes can remove the need for a
follow-up list_pkgs call.

Fixes: saltstack#62031
@agraul
agraul force-pushed the zypper-upgrade-name-pkgs branch from e46ca5d to f8c99b0 Compare October 6, 2022 10:58
@Ch3LL
Ch3LL merged commit 63cee6c into saltstack:master Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Priority 1 Sulfur v3006.0 release code name and version

Projects

None yet

3 participants