-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] pkg.list_pkgs(attr="all
) (yum/zypper) calsl
pkg_resource.format_pkg_list()` wrongly
#62032
Labels
Comments
Merged
3 tasks
agraul
added a commit
to openSUSE/salt
that referenced
this issue
Jun 14, 2022
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)
meaksh
pushed a commit
to openSUSE/salt
that referenced
this issue
Jul 7, 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)
agraul
added a commit
to agraul/salt
that referenced
this issue
Oct 6, 2022
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
Ch3LL
pushed a commit
that referenced
this issue
Oct 6, 2022
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: #62032
meaksh
pushed a commit
to openSUSE/salt
that referenced
this issue
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
to openSUSE/salt
that referenced
this issue
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
to openSUSE/salt
that referenced
this issue
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
to openSUSE/salt
that referenced
this issue
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
to openSUSE/salt
that referenced
this issue
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
to openSUSE/salt
that referenced
this issue
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)
blu-base
pushed a commit
to blu-base/saltext-zypper
that referenced
this issue
Nov 2, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
pkg.list_pkgs(attr="all")
turns"all"
into["all"]
before passing it topkg_resource.format_pkg_list()
. The latter function expects either a list of attributes or the string "all". Upon encountering["all"]
, it parses it as a list of attributes to include in its return value. As a result, only the default "version" and "arch" attributes are returned.Setup
One minion with
yum
, e.g. AlmaLinux 8 and another withzypper
(e.g. openSUSE Leap 15.3). Salt 3004 on the master and the minions.Steps to Reproduce the behavior:
Expected behavior:
Versions Report
salt --versions-report
The exact version does not matter, `zypperpkg.upgrade` does not know the parameter in any of them. I reproduced this on a setup usingAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: