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

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

Merged

Conversation

agraul
Copy link
Member

@agraul agraul commented Jun 14, 2022

What does this PR do?

Add diff_attr to yumpkg.upgrade() and add it, together with name and pkgs, to zypperpkg.upgrade().
Backport of saltstack/salt#62033

agraul added 4 commits June 14, 2022 16:34
(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)
Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)
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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)
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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
Copy link
Contributor

@SchoolGuy SchoolGuy left a comment

Choose a reason for hiding this comment

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

LGTM with small questions regarding upstreaming converted tests.

tests/pytests/unit/modules/test_zypperpkg.py Show resolved Hide resolved
tests/pytests/unit/modules/test_zypperpkg.py Show resolved Hide resolved
@meaksh meaksh merged commit c162e36 into openSUSE-3004 Jul 7, 2022
@meaksh meaksh deleted the openSUSE/backport/3004/zypper-upgrade-name-pkgs branch July 7, 2022 09:26
meaksh pushed a commit that referenced this pull request Dec 28, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
meaksh pushed a commit that referenced this pull request Dec 28, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
meaksh pushed a commit that referenced this pull request Dec 29, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
meaksh pushed a commit that referenced this pull request Dec 29, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
meaksh pushed a commit that referenced this pull request Dec 29, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
meaksh pushed a commit that referenced this pull request Dec 29, 2022
…ade()/yumpkg.upgrade() - backport 3004 (#538)

* Migrate zypper.upgrade tests to pytest

(cherry picked from commit ecce005b543f66198c7ac118966254dd3d60682f)

* Add names and pkgs parameters to zypper.upgrade

Fixes saltstack/salt#62030

(cherry picked from commit 19ebb40dc4538c983721a8746a201b7f1300c2f7)

* Don't turn attr="all" into a list

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/salt#62032
(cherry picked from commit 05482da89b91442235d3cc2889e59ac3722a7fae)

* Add diff_attr parameter to zypper/yum upgrade

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/salt#62031
(cherry picked from commit 20ffffe3be6c7d94e9cc3338a57bbf5014f33d93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants